File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Document Interface to a String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Document Interface to a String" Watch "Document Interface to a String" New topic
Author

Document Interface to a String

Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
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


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782



Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
Thanks a lot!
You made my day ;-)
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
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

Joined: Mar 17, 2000
Posts: 5782
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Document Interface to a String