tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mayol, Pere" <Pere.Ma...@tempos21.es>
Subject problems with xpath and xtags...
Date Tue, 20 Dec 2005 11:21:38 GMT
Hi,

I retrieve an XML response file from a simple http get io request.

When I try to retrieve information from the xml using xtags+xpath it seems not to work.

The response xml file I parse is:
<?xml version="1.0" encoding="utf-8"?>
<enhandedLocationTransaction xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://lBrokerWs.Tempos21.es/">
<errorCode>null</errorCode>
<errorMessage>null</errorMessage>
<enhandedLocation>
<enhandedLocationStruct>
<identificator>931755</identificator>
<coordNorthing>918734.70</coordNorthing>
<coordEasting>4582991.08</coordEasting>
<neighbourhood />
<street>AUTOP A-16 / AVGDA CANAL OLIMPIC</street>
<zip>08860</zip>
<road>A-16 (9.9)/B-210 (2.2)/BV-2003 (2.4)/BV-2041 (2.5)/C-245 (5.3)/C-246 (85.4)</road>
<region>CATALUÃ'A</region>
<errorMsg />
<groupId>100276</groupId>
<locationTime>2005/12/20 - 11/44/48</locationTime>
<userId>103861</userId>
<village>CASTELLDEFELS</village>
<area />
<province>BARCELONA</province>
<trackingId />
</enhandedLocationStruct>
</enhandedLocation>
</enhandedLocationTransaction>


The jsp code is:
<% // set base url %>
<c:set var="urlws">${baseurl}?isLogin=${login}&isPass=${password}&isGroupId=${grup}&isUserId=${usuari}</c:set>
<a href="${urlws}">${urlws}</a></p><hr/>
<% // parse xml response from http get request %>
<xtags:parse url="${urlws}" id="respostaws"/>
<xtags:context select="*" context="${respostaws}">
errorcode1:::<xtags:valueOf select="/enhandedLocationTransaction/text()"/><br/>
</xtags:context>



-------------------------------------------------------------------------
Este mensaje se dirige exclusivamente a su destinatario y puede contener
informacion privilegiada o confidencial. Si no es vd. el destinatario 
indicado, queda notificado de que la utilizacion, divulgacion y/o copia sin 
autorizacion esta prohibida en virtud de la legislacion vigente. Si ha
recibido este mensaje por error, le rogamos que nos lo comunique. 
 
This message is intended exclusively for its addressee and may contain 
information that is CONFIDENTIAL and protected by professional privilege.
If you are not the intended recipient you are hereby notified that any
dissemination, copy or disclosure of this communication is strictly
prohibited by law. If this message has been received in error, please
immediately notify us via e-mail and delete it. 
-------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message