an XML parser problem

Hi,All,

   I am trying to use DOM parser to parse a simple XML
file (in my local computer). I did  not get any error
message in parsing the file, however, when I
getDocument() from the parser and traverse it, I found
that I got all the element and attribute names
correctly as well as the document structure, but lost
all the value information for the elements and
attributes. Also, when I try to getElementsByTagName,
I get 0 entries althougth I know there are elements in
the file matches the tag name.

    I guess I did not know how to use the DOM parser,
can anyone out there kindly teach me on this?

Thanks in advance.
Steven


    Here are the few lines I used in my code:

            DOMParser parser = new DOMParser();
            ErrorHandler errorHandler = new
ErrorHandler();
            parser.setErrorHandler(errorHandler);
            parser.parse(CONTROL_FILE_NAME);
            Document document = parser.getDocument();
 
            NodeList testEntries =
document.getElementsByTagName("tagName");

    

__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

Received on Monday, 12 November 2001 19:38:51 UTC