[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: xpath query
You expression /ROOT/LEVEL2/*[@apply='1'] is almost right, but the elements with the @apply attribute are not children of LEVEL2, they are grandchildren. So you want /ROOT/LEVEL2/*/*[@apply='1'] or if you want elements at any level, /ROOT/LEVEL2//*[@apply='1'] Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Senthil Nathan [mailto:rsennat@xxxxxxxxx] > Sent: 18 January 2008 20:50 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: xpath query > > hi all, > what could be the xpath query with the foll. xml, to select > all the nodes with apply="1" in the LEVEL2 from ROOT. > > <ROOT> > <LEVEL1> > <A> > <a apply="1">100</a> > <b apply="1">100</b> > <c>100</c> > </A> > </LEVEL1> > > <LEVEL2> > <B> > <a>100</a> > <b apply="1">100</b> > <c>100</c> > </B> > <C> > <a>100</a> > <b>100</b> > <c apply="1">100</c> > </C> > <LEVEL2> > </ROOT> > > I tried using /ROOT/LEVEL2/*[@apply='1']. But it doesn't > select the intended nodes. > > Thanks > Senthil Nathan R
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|