4 Replies Latest reply: Dec 21, 2006 6:50 PM by 807607 RSS

    How Do I convert a String that contains a Valid XML to a DOM Object ?

      Hello there!
      Greetings and best wishes to everyone reading my post!

      I am learning how to create java DOM Objects specifically to generate XML Documents, I have Found it really easy and Straight forward. But I have not been able to find a code snippet that shows me how to Do the opposite operation, that is to Convert a String like this:
      String xmlDoc = 
      "<?xml version="1.0"?>" + 
      "<dbRequest user="SWITCH" base="" pkg="TSW" name="TS_IFI" MCN="0">"+
      "<spParameter name="" dataType="cursor" io="O" maxlen="0" value="" /> "+
      into a DOM Object.

      How can I accomplish this?
      If its not much trouble Could someone please give me detailed lines of code?

      Thank you very much in advance!