tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: XML processing question
Date Thu, 31 Mar 2005 14:17:07 GMT
Try this:

<c:import var="xml" url="http://devgeo.cciw.ca/cgi-bin/mapserv/eccat">
  <c:param name="version" value="1.0.0"/>
  <c:param name="service" value="WFS"/>
  <c:param name="request" value="GetCapabilities"/>
</c:import>

<x:parse var="doc" doc="${xml}"/>

<x:out select="$doc/WFS_Capabilities/@version"/>

Quoting "Kralidis,Tom [Burlington]" <Tom.Kralidis@ec.gc.ca>:

> 
> Hi,
> 
> I'm having an issue working with an XML response from a web service.
> 
> Environment:
> 
> tomcat 5.0.25
> Fedora Core 2
> 
> URL of XML response:
> http://devgeo.cciw.ca/cgi-bin/mapserv/eccat?version=1.0.0&service=WFS&re
> quest=GetCapabilities&
> 
> I can't seem to work with the response or identify specific XPath's
> which I know exist.  Below is the code I am testing with:
> 
> <%@page contentType="text/html"%>
> <%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
> <%@ taglib prefix="x"  uri="http://java.sun.com/jsp/jstl/xml" %>
> 
> <html>
>  <head>
>   <title>test</title>
>  </head>
>  <body>
>   <c:set var="requestURL" scope="page"
> value="http://devgeo.cciw.ca/cgi-bin/mapserv/eccat?version=1.0.
> 0&service=WFS&request=GetCapabilities"/>
>   <c:import url="${requestURL}" varReader="xmlSource">
>    <x:parse var="doc" xml="${xmlSource}" scope="page" />
>   </c:import>
> 
>   <p>Version is: <x:out select="$doc/WFS_Capabilities/@version"/></p>
>  </body>
> </html>
> 
> ...any suggestions would be valued.
> 
> Thanks
> 
> ..Tom
> 
> =========================
> Tom Kralidis
> Senior Systems Scientist
> Environment Canada
> Tel: +01-905-336-4409
> http://www.ec.gc.ca/

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
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