It's not a secret anymore!*
The moose likes XML and Related Technologies and the fly likes How to read/modify XML  data in String format. Urgent Plz Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to read/modify XML  data in String format. Urgent Plz" Watch "How to read/modify XML  data in String format. Urgent Plz" New topic
Author

How to read/modify XML data in String format. Urgent Plz

Gul Khan
Ranch Hand

Joined: Sep 03, 2003
Posts: 173
Hi
I am new to xml technology and trying to solve a problem. i m getting an xml file as a string from another program and i m suppose to read its elements/attributes and/or update element/attribute data.
I have searched and read some sites about DOM but the problem is that to create document it needs a URI,File or InputSource.
I was wondering how to use my XML in String format as the input source to create Document.
I appreciate any kind of help.
Thanks
GUL
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
1. You can create a java.io.StringReader from a String
2. You can create an org.xml.sax.InputSource from a Reader.
Bill


Java Resources at www.wbrogden.com
Gul Khan
Ranch Hand

Joined: Sep 03, 2003
Posts: 173
Thanks alot william for the help. I believe it will work for me.
Gul
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to read/modify XML data in String format. Urgent Plz
 
Similar Threads
Reading an XML
Force the browser to display the Save dialog box
.jsp file to .pdf file
XML output file with Control M Characters
Tool for generating an XSL sheet of a XML