This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Gul Khan
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot william for the help. I believe it will work for me.
Gul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic