House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  XML

Search XML Tree help

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Something like
Rob Wilkerson
10/18/06 07:13 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Christopher Chin
10/18/2006 06:33 PM

First off, I'm an XML newbie, but not a CF newbie :) I'm trying to figure out how to search an xml document that is being handed to me by another process within the company.  Basically it's a small database. Here's a sample: <employee id="jsmith"> <fname>John</fname> <lname>Smith</lname> </employee> <employee id="jjones"> <fname>Jack</fname> <lname>Jones</lname> </employee> How do I search the tree and get all of the childnodes for id="jjones"?  ID is an attribute of employee and I'm having trouble figuring this out with CF. Any help is much appreciate. thanks! Chris

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rob Wilkerson
10/18/2006 07:13 PM

Something like XMLSearch ( myXML, '/employee[@id='jjones']/*' ) Should do the trick.  I didn't test this and I'm not certain of the   "*", but that should get you in the neighborhood. Rob Wilkerson On Oct 18, 2006, at 6:23 PM, Christopher Chin wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Christopher Chin
10/19/2006 01:44 PM

Thanks Rob!  I'll give this a try and let you know how I fare. --Chris ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Search xml

May 21, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference