Parsing XML - xmlerr, bad document id
Posted: Thu Aug 10, 2017 11:30 am
Hello there, this is only my 2nd post to the forums, I am new to LiveCode and coding in general.
Also because this is only my 2nd post I could not post URL's so I have put all of my code i refer to in this post inside a sample livecode stack.
The app I am trying to build sends a request to a SOAP web service and returns XML data, I am trying to parse that XML data.
To begin with I have been following the lesson "How to read in data from an XML file" on the LiveCode Lessons website.
I replaced the sample XML file in this lesson with the XML data shown in the attached sample file (The XML is included in the bottom field - note in my actual app this is located in a file called preferences.xml - just like the lesson suggests)
Then following the lesson, and some assumptions I was making, I edited the code for parsing the XML to suit my XML file. ( the code for this is included on the button in my sample file )
In my live app when I press the button, I get this error "xmlerr, bad document id"
I am hoping someone can spot what I am clearly doing wrong and help point me in the right direction
Thanks in advance for taking the time to look at this
Also because this is only my 2nd post I could not post URL's so I have put all of my code i refer to in this post inside a sample livecode stack.
The app I am trying to build sends a request to a SOAP web service and returns XML data, I am trying to parse that XML data.
To begin with I have been following the lesson "How to read in data from an XML file" on the LiveCode Lessons website.
I replaced the sample XML file in this lesson with the XML data shown in the attached sample file (The XML is included in the bottom field - note in my actual app this is located in a file called preferences.xml - just like the lesson suggests)
Then following the lesson, and some assumptions I was making, I edited the code for parsing the XML to suit my XML file. ( the code for this is included on the button in my sample file )
In my live app when I press the button, I get this error "xmlerr, bad document id"
I am hoping someone can spot what I am clearly doing wrong and help point me in the right direction
Thanks in advance for taking the time to look at this