New to XML Parsing

A

ashulko

Hi,
I need a little help here as Im new to xml .The problem is in my web
App I get response as xml and I try to parse it using
DocumentBuilderFactory. All seems to work fine I dont get any errors
but the Document generated shows up
nothing..document.getDocumentType() returns null...

What may be the reason!!

Ashutosh
 
J

Jana

Quoth "(e-mail address removed)":
Hi,
I need a little help here as Im new to xml .The problem is in my web
App I get response as xml and I try to parse it using
DocumentBuilderFactory. All seems to work fine I dont get any errors
but the Document generated shows up
nothing..document.getDocumentType() returns null...

What may be the reason!!

Mime type text/xml unknown to originator?
 
M

Martin Honnen

I need a little help here as Im new to xml .The problem is in my web
App I get response as xml and I try to parse it using
DocumentBuilderFactory. All seems to work fine I dont get any errors
but the Document generated shows up
nothing..document.getDocumentType() returns null...

Does the XML you receive have a DOCTYPE node? It is not unusual that
there is no DTD associated with an XML document. It should have a root
element however so
document.getDocumentElement()
should not be null.
I am afraid we can only guess what goes wrong, you need to provide the
relevant code you have written to use DocumentBuilderFactory and show us
how the XML looks.
 
S

Simon Brooke

in message <[email protected]>,
Hi,
I need a little help here as Im new to xml .The problem is in my web
App I get response as xml and I try to parse it using
DocumentBuilderFactory. All seems to work fine I dont get any errors
but the Document generated shows up
nothing..document.getDocumentType() returns null...

Show us your code. We can't say anything helpful without seeing it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top