Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

about document2string

 
qingwu wang
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyooooone:
pls help me!
the code snippet as following:

then I should udpMsg string like this:
but the result like this:
I compress it to pos.war,it can run and parse right in my pc,but I put it to another pc,it will cannt be parsed right.
I will very appreciate if anyone can help me!~
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do I get the feeling that toString() is not promised to do anything particular and the other machine's/parser's DOM implementation classes just happen to output the XML representation...
I really think you should produce the XML using classes/methods documented in the API. Try something like this:
 
qingwu wang
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but it default encoding is 'utf-8',I want to set it as 'GBK'.I use dom lever 2,it looks like not existing setEncoding method to Document object.
what should I do?
 
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!