Ignoring ampersand characters

A

Andy Coleman

Hi,

I am trying to pasrse an XML message fed from another system. It is
not forming the XML correctly and is modifying '&' characters in the
text. So when it has text such as 'this&that' it does not generate
'this&that' but leaves it as 'this&that'.

I have asked the people who generate the xml message to change their
software to work correctly but is there a way I can get around this in
the meantime.

I am using xerces SAX parser version 2.6.2

Thanks for the help.

Andy
 
R

Richard Tobin

Andy Coleman said:
I have asked the people who generate the xml message to change their
software to work correctly but is there a way I can get around this in
the meantime.

Not from inside the XML code. But you could run it through something
first to convert the ampersands. On a unix system

sed 's/&/\&/g'

will do it.

-- Richard
 
A

Andy Coleman

Not from inside the XML code. But you could run it through something
first to convert the ampersands. On a unix system

sed 's/&/\&/g'

will do it.

-- Richard
Thanks Richard, I had come to the same conclusion myself.

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top