This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Web Services and the fly likes I need to parse the data of my webservice response. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "I need to parse the data of my webservice response." Watch "I need to parse the data of my webservice response." New topic
Author

I need to parse the data of my webservice response.

himan Gupta
Greenhorn

Joined: Jul 03, 2009
Posts: 2
Hi,
I need to parse the data of my webservice response.
which looks like
<ul class="jive-sidebar-populartags">
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=abc&recursive=true" title="Used 1 times">abc</a></li>
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=forthone&recursive=true" title="Used 1 times">forthone</a></li>
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=hi&recursive=true" title="Used 1 times">hi</a></li>
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=ho&recursive=true" title="Used 1 times">ho</a></li>
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=jai&recursive=true" title="Used 1 times">jai</a></li>
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=my&recursive=true" title="Used 1 times">my</a></li>
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=myblog&recursive=true" title="Used 1 times">myblog</a></li>
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=new&recursive=true" title="Used 1 times">new</a></li>
<li class="jive-tagset-popularity9"><a href="http://localhost:8080/jive_sbs/tags?tags=one&recursive=true" title="Used 2 times">one</a></li>
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=question&recursive=true" title="Used 1 times">question</a></li>
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=second&recursive=true" title="Used 1 times">second</a></li>
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=taggggggggggggggggggggggggggggggg&recursive=true" title="Used 1 times">taggggggggggggggggggggggggggggggg</a></li>
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=third&recursive=true" title="Used 1 times">third</a></li>
<li class="jive-tagset-popularity0"><a href="http://localhost:8080/jive_sbs/tags?tags=yea&recursive=true" title="Used 1 times">yea</a></li>
</ul>
<p class="jive-sidebar-viewall">
<a href="http://localhost:8080/jive_sbs/tags&recursive=true">View all</a>
</p>

need to get the values between the links for example in the first link it is "abc"; if you can give codeAPI would be of great help

please help
Cristian Boariu
Greenhorn

Joined: Jul 04, 2009
Posts: 9
Hi himan,
Have you solved it?

I recommend using XMLBeans from apache to read the xml.

Yeah, you have to read the tutorial and try yourself but at the end you'll
enjoy the way XMLBeans handles the xmls files.

Have a look at this tutorial: http://xmlbeans.apache.org/documentation/tutorial_getstarted.html

Have fun.


Software Developer - Java
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1164
Himan,

As long as you pass a well-formed XML, any XML parser, such as DOM, SAX, etc. can parse it.

I'm not sure you deal here with well-formed XML. Got the following message from IE when trying to view your data (after introducing a root element) -

A semi colon character was expected.


BTW, do you pass plain HTML in the response?

Regards,
Dan

William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I need to parse the data of my webservice response.
 
Similar Threads
I need to parse the data of my webservice response.
set values in a table from other
Struts Validation Framework Problem...........Do Help
I am finding difficulty in using CSS with IE.
Can you read this?