Hi. If your XML looks like <tag>content</tag>, then "content" is NOT the node value of the node "<tag>". It is the node value of the first child node (which should be a text node).
Julian > -----Original Message----- > From: Cory Hubert [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 20, 2001 6:35 PM > To: [EMAIL PROTECTED] > Subject: Problem with DOMParser > > > Hello. I am having some issues using the DOMParser. I read the > Documentation. And I believe I am doing everything correctly. > The following > code reads in the xmlResponse.xml document correctly, you can even get the > name of the Nodes within the document. BUT you can't retrieve > thier values. > Any Idea what could be the issue? > > DOMParser p = new DOMParser(); > InputSource source = new > InputSource("xmlResponse.xml"); > p.parse(source); > Document doc = p.getDocument(); > Element docElement = doc.getDocumentElement(); > > for (int i =0; i < > docElement.getChildNodes().getLength(); i++) > { > > System.out.println(docElement.getChildNodes().item(i).getNodeName()); > > System.out.println(docElement.getChildNodes().item(i).getNodeValue()); > } > > Invertica > :Cory L Hubert > :Senior Software Engineer > :[p]646-792-6588 > :[f]212-571-3588 >
