What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » [?] XMLDom loading files with <?xml ?> data...

[?] XMLDom loading files with <?xml ?> data...
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. [?] XMLDom loading files with <?xml ?> data...
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:
Javascript 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).
Javascript 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?  :S
06-13-2011 10:33 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On