Skip to Content
avatar image
Former Member

How to parse the xml file using servlet

My scenario is like this:

<b>FILE-- >XI -->J2EE Application</b>

XI sends the xml file to j2ee application. My servlet receives the file in HTTPRequest string.

How to parse that file using servlets.I should get the xml file as it is and should be displayed in the browser.

Can anyone please help me with code, its urgent.

Please help me!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    May 16, 2006 at 03:19 AM

    You can use the <b>Echo</b> Sax parsing program on sun website to emit the request xml as it is

    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/sax/2a_echo.html

    and the inputstream to feed to the SAX parser instnace could be recieved as

    request.getInputStream());

    Rgds,

    Amol

    Add comment
    10|10000 characters needed characters exceeded