Hi,
I am trying to use the XMLWriter to send an XML stream to a browser
(reduce from a much larger Document). The elements I want to write exist
in a namespace. But everything I have tried so far will not create the
namespace in the outputstream. If I use the XMLWriter to write the dom4j
Document it works as expected. How can I get the namespace into the output?
Here is an example of what i have tried:
XMLWriter xmlWriter = new XMLWriter(out);
xmlWriter.startDocument();
xmlWriter.writeOpen(parentElem);
//xmlWriter.write(parentElem.getNamespace());
List<Element> children = parentElem.elements();
for (Element child : children) {
xmlWriter.writeOpen(child);
xmlWriter.writeClose(child);
}
xmlWriter.writeClose(parentElem);
xmlWriter.endDocument();
xmlWriter.close();
thanks,
-Rob
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user