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 version="1.0" encoding="UTF-8" standalone="yes"?>
Trouble is, I can only seem to read the first line (<?xml ... ?>). Using something like:
XMLDom.selectSingleNode("//app/" + Node + "/").nodeValue
...where Node is any of the child nodes (name, coder etc.), always seems to return:
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).
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?