First of all, you must separate between attributes of type ID, which is 
defined by a DTD or Schema and there also exist attributes which local name 
is "Id". For instance, you can say that all "Id" attributes in an Element 
in the XML Signature or XML Encryption namespace are also of type ID. So 
you can query the document getElementByTagNameNS("&dsig;", "Signature") and 
check whether you find the appropriate IDs.



--On Montag, 22. April 2002 13:55 -0700 "Shang, Crystal" 
<[EMAIL PROTECTED]> wrote:

> 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
>


Reply via email to