Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
Beginning Java
How to convert String to org.w3c.dom.Document
John Landon
Ranch Hand
Posts: 241
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How to convert
String
to org.w3c.dom.Document
thanks.
Paul Clapham
Sheriff
Posts: 28346
97
I like...
posted 16 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
Document doc = builder.parse(new InputSource(new StringReader(theString)));
Rob Spoor
Sheriff
Posts: 22818
132
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Where builder is an instance of javax.xml.parsers.DocumentBuilder.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
Er. Ashish Aggarwal
Greenhorn
Posts: 3
posted 11 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
To convert String to Dom/Document object
Document document = builder.parse(new InputSource(new StringReader(inputString)));
and if you have input stream that you can directly transform stram to document object
Document document = builder.parse(new InputSource(inputStream));
for futher transformation of string to dom and dom to String object please refer this link.
http://iandjava.blogspot.com/2013/06/java-string-to-document-and-document-to.html
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to put clob in org.w3c.dom.Document
Document to File
Converting a Document type into String
String representation of a org.w3c.dom.Document object
how to convert Byte to the String
More...