Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with XML and special character

Status
Not open for further replies.

PeteJohnston

Programmer
Nov 6, 2002
291
0
0
GB
I'm using XML-Into with a handler procedure to read the contents of an XML document held as a file in the IFS. It works really well apart from one thing. When any characters that XML regards as Special are included in the data it ignores them. Things like &, <, > and =. In one example, a customer name includes & - the ampersand character. If you look at the XML file it holds it as George &amp; Bert but when it hits the RPG code it has dropped the & and I get George Bert.

Any ideas?

PeteJ
(Contract Code-monkey)

It's amazing how many ways there are to skin a cat
(apologies to the veggies)
 
You may try this <![CDATA[ your_text_with special characters ]]>.
Vadim
 
Hi Botatun

The problem is with incoming text so I don't have control over any CDATA keywords. When the text arrives in the handler during the *XML_CHAR event it has already stripped out &amp; so I don't even get to find out that something is missing.

PeteJ
(Contract Code-monkey)

It's amazing how many ways there are to skin a cat
(apologies to the veggies)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top