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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with XPath-Query Statement 1

Status
Not open for further replies.

SgtPeppa

Programmer
Jul 7, 2003
154
DE
Hi all,

I am no good at this whole xpath query thing. I have an Xml Structure like this

Code:
<Root>
  <parent type ="a">
    <child>texta</child>
  </parent>
  <parent type ="b">
    <child>textb</child>
  </parent>
</Root>

My query should look something like this:

Select child where parent type =a

Is that possible with xPath?

Something like //parent @type ='a' / child ?

Thanks for your support!

Stephan
 
sorry

Code:
<xsl:value-of select="//parent[@type = 'a']/child/"/>

I'm a little rusty ;)

Matt

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top