Might be easiest just to write your own "DOM walker" that iterated elements & their children, testing for the attribute you're searching on. We do this pretty extensively.
Rick Bullotta CTO Lighthammer Software (www.lighthammer.com) -----Original Message----- From: Shang, Crystal [mailto:[EMAIL PROTECTED]] Sent: Monday, April 22, 2002 4:56 PM To: [EMAIL PROTECTED] Cc: Huynh, Dung Subject: locate an element with certain Id attribute Hi, Is there a way or an API in Xerces to locate an element in a document with certain Id attribute? E.g, given the following XML file, can we locate the element whose id is "targetID" quickly without the help of XPath evaluation? I'm trying to remove the XPath dependency in our code because of some design issues. ...... <myElement Id="targetID">...</myElement> ...... Thanks, - Crystal
