Searching for a tag name in XML

David Bovill david at vaudevillecourt.tv
Tue Apr 21 11:20:40 EDT 2009


Looks like there is no easy way to search for an XML node? I want to search
for a "<table>" element in xHTML. I can pull it out by looking for a
particular value for the param - say border:

put revXMLMatchingNode (treeID, pStartNode, "table", "border", "2", -1) into
foundNode

but given that it may or may not have such parameters:

put revXMLMatchingNode (treeID, pStartNode, "table", "", "", -1) into
foundNode

does not find anything.

I can of course use built in rev commands to find the tag - but then it is
not so easy to find the nodes path in the XML tree so I can pull out the
entire table reliably from the xHTML.

Is there any way to do this?



More information about the use-livecode mailing list