Hi Brian,
Thanx for the link, I tried it first with the same code I was using with
the MM parser and it threw up the same errors.
So if you use the code
myVar = XMLparser.child[1].child[i].child[1].text -- or type
and that element is <myVar />, you get an error. I looked into the extra
features of Andy White's parser and have worked round the problem by
doing the following:
nodeURL = gParserObject.getElementByName("url")
repeat with i = 1 etc....
itemURL = nodeURL[i].getText()
which returns "" for any <myVar /> style tags.
JamieD
Hi Richie and Jamie,
Actually, according to XML specification:
"Empty tag: In XML, a start and end tag combined in one tag. The tag has
a trailing slash, so an XML parser can immediately recognize it as an
empty tag and not bother looking for a matching end tag. For example, if
foo is an empty tag, it looks like <foo/>. "
Now as to why your XML isn't being parsed properly, that I can't say.
I've given up total use of the MACR XML Xtra and have been using Andy
White's Lingo-based parser:
http://www.cathode.co.uk/director/xml/parser/latest/xmlparser.cst
You can also try the DOM-licious "DOM-Lingo"
(http://www.devhq.com/dom-lingo/) which I hear is quite impressive. It
was still in Beta when I began the project I'm working on, but I may
switch over in the future.
Hope that somewhat helps.
Brian Romanko
Lead Developer - Neo/SCI Corporation
Member - Greater Rochester Macromedia User Group
>-----Original Message-----
>Hi
>I think even if u have no element in the tag u must
>atleast complete it, this is not right XML syntax that
>is y it is giving errors while parsing...
>
>> <item id="2">
>> <description>this is something</description>
>> <url>http://....</url>
>> <links/>
>> </item>
>>
>
>
>this shud instead be:
>
>> <item id="2">
>> <description>this is something</description>
>> <url>http://....</url>
>> <links><links/>
>> </item>
>>
>
>try it now
>Regrads
>Richie
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]