Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XPath: Dual statement and getting and data

Status
Not open for further replies.

Jawa

Programmer
Feb 21, 2002
74
US
I have an Xpath statement where I am going after two paths:

<cfset Parent = #XmlSearch(ContainersXml, &quot;/cms_containers/container[@menu='yes']|/cms_containers/container[@menu='yes']/content[@landing='yes']&quot;)# > <!--- Get Parent--->

From this XPath I want to pull the info only from the second path (I ahve what I need from the first one):

/cms_containers/container[@menu='yes']/content[@landing='yes']


I need to get at the first content container where the attribute landing = yes, however I need to display the attribute for label.

The XML partially looks like this:

<cms_containers default=&quot;4F1F609F-C09F-0662-D2E8527FEE4037C4&quot;>
<container ID=&quot;A4549BC1-C09F-0662-D22A8D038FE354E2&quot; menu=&quot;no&quot; name=&quot;Home Page&quot;>
<!-- There are 5 Children -->
<content ID=&quot;305&quot; label=&quot;qwerty-305&quot; ctcd=&quot;WEB&quot; live=&quot;yes&quot; archived=&quot;no&quot; landing=&quot;yes&quot;>qwerty</content>
</container>

Any thoughts?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top