Handling special characters with XML

I have an XML file that can potentially have special symbols in it such as &,/,<,>. etc.

How do I handle this characters with out exceptions being thrown?

Example File

<?xml version="1.0" encoding="utf-8" ?>

<BATCH>

<PAGE>

<GROWER>1</GROWER>

<SIGNATURE_DATE>010507</SIGNATURE_DATE>

<CLIENT_NUMBER>R1234567</CLIENT_NUMBER>

<CLIENT_NAME>JOHN & JANE SMITH</CLIENT_NAME>

<PAGE>

</BATCH>

Thanks

[611 byte] By [svagera] at [2007-11-27 3:50:52]
# 1

> I have an XML file that can potentially have special

> symbols in it such as &,/,<,>. etc.

>

> How do I handle this characters with out exceptions

> being thrown?

>

> Example File

>

> <?xml version="1.0" encoding="utf-8" ?>

> <BATCH>

><PAGE>

><GROWER>1</GROWER>

> <SIGNATURE_DATE>010507</SIGNATURE_DATE>

><CLIENT_NUMBER>R1234567</CLIENT_NUMBER>

> <CLIENT_NAME>JOHN & JANE SMITH</CLIENT_NAME>

><PAGE>

> BATCH>

>

> Thanks

hi!

you can use this:

to write & use : &amp

to write < use : &lt

to write > use : &gt

Taigoa at 2007-7-12 8:54:48 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...