[thelist] beginner XML ASP question
Jacques Capesius
jacques_capesius at cnt.com
Tue Oct 1 08:46:00 CDT 2002
<snip>
For one thing, your open/close tags don't match?
</snip>
see, I told you it was something stupid I was doing. Well, taking lon's much
appreciated advice, I reformatted the xml document as follows.
<?xml version="1.0"?>
<articles>
<webObject>
<IDNo>1</IDNo>
<Title>How to code in XML</Title>
<Subject>XML</Subject>
<keywords>XML Code</keywords>
<content>Don't bother. It's too difficult.</content>
</webObject>
</articles>
...and I changed the code around to access it a little, so that it looks
like this.
Dim xml,root,i
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = False
xml.load (Server.MapPath("test.xml"))
set root = xml.documentElement
For i = 0 To (root.childNodes.length)
document.write(root.childNodes.item(i).text & "<br>")
Next
... still, the root.childNodes.length throws an "object required" error.
I'll continue to look into this, but any nudge in the right direction would
be most appreciated. Thanks again, fellaz.
-jacques :)
More information about the thelist
mailing list