Problem solve Get help with specific problems with your technologies, process and projects.

Using XML DOM object to make a database call

On my Web page (IE5.0), I am using XML DOM object to make a database call. The result set is received in XML format by the client function (javascript) which parses it. If my XML text content contains the character '(r)' then on some user machine the parser errors with a message 'invalid character in the text content'. On most other systems, it handles it just fine. What is the problem and how can I fix it? Here is a sample of XML text:


The problem here is not to do with the "(r)". There are two problems with your sample XML:

1. The CDATA section markup has been rendered incorrect by the replacement of "[" and "]" characters with references to characters 91 and 93. Using character references rather than characters themselves hides the CDATA section from the parser. I doubt that this is what you want to do.

2. There is a <Name> start-tag where the end-tag should be (before the Record end-tag.

Dig Deeper on Topics Archive

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.