Note: this question relates to using the XMLDom ActiveXObject with an HTML Application, although this effect also occurs with standalone JScript, and I assume with Plus! scripting as well.
I'm trying to load an XML file that looks something like this:
xml code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app version="1.0">
<name>...</name>
<coder>...</coder>
<version>...</version>
<release_date>...</release_date>
<short_description>...</short_description>
<long_description>...</long_description>
</app>
Trouble is, I can only seem to read the first line (<?xml ... ?>). Using something like:
js code:
XMLDom.selectSingleNode("//app/" + Node + "/").nodeValue
...where Node is any of the child nodes (name, coder etc.), always seems to return:
code:
version="1.0" encoding="UTF-8" standalone="yes"
Even using
//app[@version="1.0"]/ has no effect. However, the following code works (by returning the app node).
js code:
XMLDom.selectSingleNode("//").nextSibling // but can also select //app/ or anything else
As long as the select function receives something with a // at the start, it fetches the <?xml ?> section. Why is this?