parsing XML String in java...


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: parsing XML String in java...

  1. #1
    Guest

    parsing XML String in java...


    hello,
    i am making my first "real work" program in java,
    a servlet witch send XML over HTTP and receive an XML response.

    all that work perfectly, but know i want to parse the String variable
    witch contain the XML response document.

    i'm using visual age 3.5
    and the com.ibm.xml.parsers.DOMParser

    how can i parse a String ?
    my aim is not to create a file just to parse it and delete it
    (remenber it's a servlet)


  2. #2
    Mark Guest

    Re: parsing XML String in java...


    DOMParser parser = new DOMParser();
    parser.parse(new InputSource(new java.io.StringReader(xml))); // xml is a
    string containing xml
    Document doc = parser.getDocument();

    <BRUN99@memo.mpsa.com> wrote:
    >
    >hello,
    >i am making my first "real work" program in java,
    >a servlet witch send XML over HTTP and receive an XML response.
    >
    >all that work perfectly, but know i want to parse the String variable
    >witch contain the XML response document.
    >
    >i'm using visual age 3.5
    >and the com.ibm.xml.parsers.DOMParser
    >
    >how can i parse a String ?
    >my aim is not to create a file just to parse it and delete it
    >(remenber it's a servlet)
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center