This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 1167
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: 1167
Thanks a lot!
You made my day ;-)
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1167
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!
 
 
subject: Document Interface to a String
 
Similar Threads
From Document Object to a byte array
Converting Document to String
Document to String
Converting Document Object to String
String parsing help.