Submitted by Ric (not verified) on 4 May 2007 - 9:36am.
Your article is PACKED with very import info for me.
There's the search() under the 'custom function' section (and the variables part) that is germane to what I need.
After some fiddling, the following is a useful snippet to check for the existence of a particular element that I need to know (using your animals list):
x.toXMLString().search('animal');
...which returns 1; found.
x.toXMLString().search('ric');
...which returns -1; not found.
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"
Performing global search within an XML list
Your article is PACKED with very import info for me.
There's the search() under the 'custom function' section (and the variables part) that is germane to what I need.
After some fiddling, the following is a useful snippet to check for the existence of a particular element that I need to know (using your animals list):
x.toXMLString().search('animal');
...which returns 1; found.
x.toXMLString().search('ric');
...which returns -1; not found.
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"