R
ryan.marples
Hi folks,
I am writing a set of servlets that will return XML based on some
backend logic. I have used the DOM method and after my processing am
left with a org.w3c.dom.Document object that I want to stream down to
the client.
Seems simple but I'm not clear how to actually send this xml document
to the response stream. I found a code example that used the
javax.xml.transform.Transformer but am getting an error about
namespaces when I try this. I don't really want to "transform" the xml,
just write it out, so is this really the right method to use? Isn't
there just an XmlWriter class or something that given a stream and
write the doc out to?
I am writing a set of servlets that will return XML based on some
backend logic. I have used the DOM method and after my processing am
left with a org.w3c.dom.Document object that I want to stream down to
the client.
Seems simple but I'm not clear how to actually send this xml document
to the response stream. I found a code example that used the
javax.xml.transform.Transformer but am getting an error about
namespaces when I try this. I don't really want to "transform" the xml,
just write it out, so is this really the right method to use? Isn't
there just an XmlWriter class or something that given a stream and
write the doc out to?