> Ok, I'm trying to get my head around this XML stuff.  I've got a
> document/structure something like this.
> 
> <root>
>    <article>
>       <type>News</type>
>    </article>
>    <article>
>       <type>Event</type>
>    </article>
>    <article>
>       <type>News</type>
>    </article>
>    <article>
>       <type>Event</type>
>    </article>
>    <article>
>       <type>Headline</type>
>    </article>
> </root>
> 
> What would I want to do (in ColdFusion at this time) is parse this
> structure and return a subset structure such as below!  In other words, I
> want to return a structure only containing "type" nodes of a certain
> value.  I have tied every way I could think of to use xmlsearch() and an
> xpath string to get this, but can't seem to quite get it right.
> 
> <root>
>    <article>
>       <type>Event</type>
>    </article>
>    <article>
>       <type>Event</type>
>    </article>
> </root>
> 
> The closet I've gotten is this.  <cfset newXML =
> XmlSearch(masterXML,"/root/article[type = 'Event']")>.  But, this returns
> an Array of XML structures, when what I really want is a single XML
> structure.
> 
> newXML[1]=
>       <article>
>          <type>Event</type>
>       </article>
> newXML[2]=
>       <article>
>          <type>Event</type>
>       </article>
> 
> What relatively basic concept am I not getting here?
> 
> --------------
> Ian Skinner
> Web Programmer
> BloodSource
> Sacramento, CA
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to