Hi All,

 

I would greatly appreciate any help that you could provide on helping me complete my task. I am new to Xerces and XML parsing and having difficulty understanding how I should be implementing this functionality.

 

I have a web form that allows a user to enter text(may contain reserved characters)/image upload used to populate a remote web page. My Servlet(Action) as I am using Struts, takes the text and image byte[] and creates a XML document containing the data. As I build the DOM I use a Base64 encoding tool to encode my text and image byte[].

 

I then send the XML DOM to a remote Servlet to be handled. I do this via HTTP POST using the XMLSerializer to write the DOM to the Servlets OutputStream

 

XMLSerializer serializer = new XMLSerializer(os, null);

serializer.serialize(doc);  

 

I have been looking at the OutputFormat and wondering if I could just set the encoding of the OutputFormat and my text nodes would be encoded by the XMLSerializer. If so could I still use the Base64 encoder to encode my image byte[]?

 

Any help much appreciated,

 

Greg

 

 

Reply via email to