logo       

RE: Find object by attribute value: msg#00054

text.xml.xmlbeans.user

Subject: RE: Find object by attribute value

I think the easiest thing would be to using xpath.

I learned the basics of it from a zvon tutorial. Try a search for xpath tutorial.

There is also a sample using xmlbeans

http://xmlbeans.apache.org/samples/XQueryXPath.html

 

I think your xpath would be something like:

//obj[@name=”test1”]

 

Best of luck.

-Jacobd

 


From: Alistair Young [mailto:alistair@xxxxxxxxxxxxx]
Sent: Friday, November 24, 2006 6:31 AM
To: user@xxxxxxxxxxxxxxxxxxx
Subject: Find object by attribute value

 

Hi there,

 

is there an easy way to find an object by it's attribute value?

 

<doc>

  <obj name="test1"></obj>

  <obj name="test2"></obj>

</doc>

 

DocDocument.Factory.parse...

getDoc().getObj( where "name" == "test1" )

 

thanks,

 

Alistair

 




--------------

mov eax,1

mov ebx,0

int 80h

 

 

 

 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise