File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Receiving an XML file via HTTP-POST and processing it using Stax XML parser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Receiving an XML file via HTTP-POST and processing it using Stax XML parser" Watch "Receiving an XML file via HTTP-POST and processing it using Stax XML parser" New topic
Author

Receiving an XML file via HTTP-POST and processing it using Stax XML parser

Ramprakash Ramamoorthy
Greenhorn

Joined: Jan 16, 2012
Posts: 3
Dear all,

I am able to post a .xml file to my servlet via this http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/src/examples/PostXML.java?view=markup.


How do I receive this in my servlet and manipuate it using the stax xml parser. My assignment is in such a way that I will have to use only the stax parser. Thanks in advance.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18651
    
    8

Notice that you have asked two questions. This is the XML forum, so let me answer the XML question. You take the InputStream which your servlet gets from the POST data, and pass it to your Stax parser. If I read the documentation correctly, that would be something like
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Receiving an XML file via HTTP-POST and processing it using Stax XML parser