Discussion Locked

using javascript to display xml doc with dtd

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello,

I am able to get the javascript to open the xml document without the dtd. But when I add the dtd in the xml, the javascript will no longer display the xml data. Help!

I have the html/javascript code, the xml file with the list of news articles and then the xml file with dtd.

your comments suggestions,etc....are greatly appreciated.

Thank you,
kim



Load Xml Document Demo


2 replies

by kbowen

Hello,

I found out was was really going on. I don't need a DTD. I am learning.

The problem really was the htmltxt += news[j].childNodes(2).firstChild.text; //content line not displaying the full text of the in the xml file. When I changed it to htmltxt += news[j].childNodes(2).text; //content. It displayed all of it.

But....it doesn't display the
tags in the xml document properly with in the innerhtml of the div tag. I am still researching what can be done to resolve this.

Thank you everyone and sorry for the confusion.

Kim

by Former member

Hi

This means that your xml is not valid according that dtd. I had the same problem with IE. Just turn validation off and it works.
xmlDoc.validateOnParse = "false"

This discussion is closed to new replies.