RE: [xml] XPath / LibXML question

Well, that certainly returns just the one result correctly...

I take it from your comments about it not being optimized that it will
still find all results before returning the first, rather than just
terminating at the first match?



"Buchcik, Kasimier" <k buchcik 4commerce de> wrote on 01/06/2006 15:45:36:


-----Original Message-----
From: xml-bounces gnome org [mailto:xml-bounces gnome org] On
Behalf Of Buchcik, Kasimier

As Aron already pointed out, the position() should be of
help. You need to select the descendant-or-self or descendant
Your expression could look like this:
"//instance[ att2='2' and
parent::instances/parent::item[ att1='1']][1]"

Whoops, sorry this should read:
"/descendant::instance[ att2='2' and
parent::instances/parent::item[ att1='1']][1]"



This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
postmaster scee net

This footnote also confirms that this email message has been checked
for all known viruses.

Sony Computer Entertainment Europe

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]