Reading XML with start tag and end tag all in one tag

mfstuart at cox.net mfstuart at cox.net
Tue Jul 2 11:14:27 EDT 2013


Hi,
I'm using LC to read this type of XML and my script returns an error: xmlerr, can't find element.
when reading the <Version val=> tag (see below).

XML to read:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Application>

  <Header>
    <Version val="11001.00"/>
    <APPLICATION val="N"/>
    <WithIsn val="N"/>
    <WITH_MODELS val="Y"/>
    <MAIN_PRG_VARS val="0"/>
    <MAIN_PRG_DSPS val="1"/>
    <STP END="1" START="1"/>
  </Header>

</Application>

This is just a snipping of the XML file, but wanted to show at least a part of it to see what it looks like.
I have the script reading the <Header> <Version val="11001.00"/> tag and extracting the version val value, but it returns the error above.
I've searched the user-list for a solution, and it seems each answer results in people spinning their own "XML reader".

Surely LC's XML functions can read this type of tag?
So if it can, what functions are used to do that?
If not, what are your suggestions?

Thanx,
Mark Stuart
LiveCode Community 6.0
OS: Win7




More information about the use-livecode mailing list