XML Newbie Woes
Mark Wieder
mwieder at ahsoftware.net
Wed Sep 18 13:11:22 EDT 2013
Graham-
Wednesday, September 18, 2013, 9:19:50 AM, you wrote:
> <metadata />
...
> The file seems to be well-formed, apart from the fact that the
> first child node is found by revXML to be "gpx/metadata", and I
> can't see the closure for the metadata tag at the other end of the
> document. In fact the document ends </gpx>f I try to stick in
> </metadata> before this last line, the LC function refuses to form
> the table, so the original file must be right. I don't understand
> this.
That's what's referred to as a "self-closed" xml tag. The "/>" at the
end of the single line closes the tag started by "<". It's one of the
many weirdnesses of xml.
> revXMLNodeContents functions to return anything. For example (among
> many attempts), revXMLNodeContents(1,"/gpx/metadata/trk/trkseg")
> returns
> "xmlerr, can't find element"
The "metadata" tag is already closed by the "/>" tag, so it doesn't
enter into the picture. Try
revXMLNodeContents(1,"/gpx/trk/trkseg")
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list