Conrad,
I think that your question is that you want to access
the enumeration list from the attribute element of a DocumentType to
being able to offer the enumeration elements in a list box.
As you discovered you can get the values set or the default values
by using something similar to:

case Node.ELEMENT_NODE:
        .
        NamedNodeMap attributes = node.getAttributes();
        String nodeName;
        String nodeValue;
        for( ( int i = 0; i< attributes.getLength();i++ ){
            Node current = attributes.item(i);
              current.getNodeName();
              current.getNodeValue();

.
Unfortunately there isn't any DOM API calls to at this time to get DTD
information. DOM 3 will have such APIs.

Another way to do this I believe is through the use of the SAX 2
DeclHandler.

Hope this helps,

             Jeffrey Rodriguez
             IBM Silicon Valley















Please tell me how do I get the elements of an enumeration attribute. For
e.g if I have Attrbute prty (odd|even) "odd". the parser gives me the value
that is set or that is defalutt(if it is not set). However I need all the
numeration elements because I want to add them to a list box so that a user
can choose an option.



________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com



Reply via email to