This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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: 12809
    
    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
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