General discussion

Locked

XML root not always found

By cybirdii ·
Hi,

We are passing back XML from the database to an ASP page. The XMl is then manipulated using javascript to render the UI in the browser (IE5). The problem I have is that
var root = source.documentElement;
(where source is the id of the XML data island) does not always return the root of the XML even though the XML has been sent back and can be loaded into XML Notepad or IE by itself. Sometimes it obtains the root, sometimes it does not. To complicate matters, a couple of other pagesusing the same method to obtain the root always work without a problem.

Does anyone know why this happens and if so what solutions I can apply? Any help would be appreciated.

Thanks in advance.

Rohit

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

XML root not always found

by cybirdii In reply to XML root not always found

Raising the points - this is an urgent issue and I need an answer ASAP. Anybody?

Collapse -

XML root not always found

by msteinhoff In reply to XML root not always found

I had a similar problem back in April that turned out to be a bug in IE5. The answer is explained in Microsoft article Q257723.

From the article:
This problem only occurs with Internet Explorer 5.01, and it usually happens when you access theXMLDOM of a large or complex inline XML data island.

I used the suggested work around:
Use the SRC attribute of the data island to point to a file instead of embedding the XML data directly in the data island itself. For example: <xml src="myXML.xml"></xml>

Not pretty, but unless you are sure of your users browser, you don't have much choice.
Mark

Collapse -

XML root not always found

by cybirdii In reply to XML root not always found

Ummm - I added a response to the question instead of rating it from here. Duh!

Here it is though...
____________________________________

Thank you for the response. However, since we generate the XML on the fly (it is not static) and we have a significantly large user base, we did not want to keep generating XML files (thus increasing file I/O, etc).

We have since overcome this issue by streaming the XML to a COMMENT tag and then using the DOM API to loadXML from the comment. Now thecode works fine.

MS has said that 5.1 or 5.5 versions of IE should fix this issue.

Rohit

Collapse -

XML root not always found

by cybirdii In reply to XML root not always found

Thank you for the response. However, since we generate the XML on the fly (it is not static) and we have a significantly large user base, we did not want to keep generating XML files (thus increasing file I/O, etc).

We have since overcome this issue by streaming the XML to a COMMENT tag and then using the DOM API to loadXML from the comment. Now the code works fine.

MS has said that 5.1 or 5.5 versions of IE should fix this issue.

Rohit

Collapse -

XML root not always found

by cybirdii In reply to XML root not always found

Solution found by Self. MS has validated our work around.

Collapse -

XML root not always found

by cybirdii In reply to XML root not always found

This question was closed by the author

Back to Web Development Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums