I don't know if this has been solved, but heres my opinion, you are retrieving the document in the first call and then reading each child of that parent document. These childs are the tag elements, if you want the text they contain then you have to get their one and only child and retrieve the  text value from there. Please remember that tags that are are left open ie notes
<NOTES>
<NOTE>This is a note</NOTE>
</NOTES>

will have a text node child which will be the carriage return.


Cory Hubert wrote:
	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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

ATT03976.txt
Content-Type:
text/plain




Reply via email to