View Single Post
 
Old November 3rd, 2005, 01:27 PM
Frank Huddleston Frank Huddleston is offline
Registered User
 
Join Date: Nov 2005
Location: San Antonio, Texas, .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using getElementById

Greetings,

   I implemented a family tree using the XML version given by Micheal Kay in his XSLT book, but now I'd like to make a standalone java application from it. I'm reading in the file and creating an XML document (DOM), and trying to use the Apache XALAN getElementById method to retrieve an individual's record by id; this has the ID attibute like so:
<IND ID="T43">
</IND>
This is just returning a null; the parser needs something to tell it that the ID field is the attribute called ID, apparently. The javadocs for XALAN put it this way:
"The DOM implementation must have information that says which attributes are of type ID. Attributes with the name "ID" are not of type ID unless so defined. Implementations that do not know whether attributes are of type ID or not are expected to return null."
So my question is: how do I tell the "DOM implementation" what to use for the ID? And what is the "DOM implementation" anyway? What exactly specifies that?
Thanks - I hope this is the right forum for this.