I'm not sure if this is a
JSP question, or a java/class file question? or xml or what, so forgive me if its in the wrong section.
Basically I'm integrating with a web service that returns some form of XML.
This is a snippet of my code from my JSP, this particular snippet is in client side javaScript.
numGuess is my java/class file and getHint processes my request to get the info by running the URL.
document.Search.searchText.value = "<%= numguess.getHint()%>"
alert(document.Search.searchText.value);
When I run this command an alert box pops up that contains the following
test:
<xmlRouterResponse><queryAndResponseSet> <queryAndResponse>
<query>gsk</query>
<response>GSK</response>
<response>Glaxo SmithKline</response>
<response>GlaxoSmithKline</response>
</queryAndResponse></queryAndResponseSet></xmlRouterResponse>
which as you can see still contains the <> xml tags.
Is there a way I can yank out just the appropriate response data and query data?
I would like my result set to come back (for this example)
to include (space delimited): gsk GSK Glaxo SmithKline GlaxoSmithKline
Can this be done at the class/java file level? or should I persue doing this at the javascript level or in the server side JSP?
[ August 03, 2004: Message edited by: Geoff Garcia ]