Bookmark Topic Watch Topic
  • New Topic

junk characters in xml response  RSS feed

 
venkat
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi,
i am getting some junk characters along with xml response.how can i avoid the junk characters.pl tell me

response.setContentType("application/x-java-serialized-object");
OutputStream os = response.getOutputStream();
ObjectOutputStream output = new ObjectOutputStream(os);
output.writeObject("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+
"<text timestamp=\"08:45:00.000\">"+
"The deadline of <name>homework 1</name> is"+
"<emph>March 9th 2001</emph>."+
"</text>");
output.flush();
output.close();
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
For the second time, please do not post the same question more than once.

And, you have previously been warned on multiple occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional, and this is your final warning. Adjust your display name to comply with the required standards prior to your next post.

Failure to comply will result in the removal of your account.

bear
JavaRanch Sheriff
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!