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: //[EMAIL PROTECTED]"test1"] Best of luck. -Jacobd ________________________________ From: Alistair Young [mailto:[EMAIL PROTECTED] Sent: Friday, November 24, 2006 6:31 AM To: user@xmlbeans.apache.org 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.