File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Document Interface to a String

 
Dan Drillich
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Day,
I'm using the Xerces Dom parser to modify a document.
Is there an existing API method that takes a Document Interface's instance and returns its String representation?
Cheers,
Dan
 
Ajith Kallambella
Sheriff
Posts: 5782
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
Dan Drillich
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot!
You made my day ;-)
 
Dan Drillich
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Day,
The serializer returns the XML document, which starts with an XML declaration.
Is there a way to get the document without the XML declaration?
Thanks
Dan
 
Ajith Kallambella
Sheriff
Posts: 5782
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope, not any easy way that I know of. However, you can do some string parsing and skip all characters until the first '>'. That should take care of removing the standard declaration.
Cheers!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic