Parsing soap response document using java.?
-
Hello all, I have a soap response document like this --------------------------------------… <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/… soap:encodingStyle="http://www.w3.org/… <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPriceResponse> <m:Price>34.5</m:Price> </m:GetStockPriceResponse> </soap:Body> </soap:Envelope> --------------------------------------… Please let me know some data about how to parse the above document using java. i will be using java 1.1 thx
-
Answer:
Use the documentbuilder class. ITs a built in xml parser in JAVA. Example: DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder parser; Document doc; try { parser = factory.newDocumentBuilder(); doc = parser.parse(theXMLInputStream); } catch(ParserConfigurationException e) { // problem with parser e.printStackTrace(); } catch(SAXException ex) { // problem parsing ex.printStackTrace(); }
thuruppu... at Yahoo! Answers Visit the source
Related Q & A:
- How to upload file to google cloud storage using Java?Best solution by Stack Overflow
- How to Implement Gateway Service something similar to Oracle API gateway Using Java and Java based Open Source frameworks only?Best solution by Quora
- how can I listen for database changes using java?Best solution by Stack Overflow
- How to search for a particular string in a text file using java?Best solution by Stack Overflow
- How do you program using Java?Best solution by wikihow.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.