You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Tom Kralidis [Burlington]" <To...@ec.gc.ca> on 2003/10/31 16:26:53 UTC
xml selection of tags with namespace prefixes
Hi,
I have a JSP file which fetches XML from a web service and parses
accordingly. The response XML document has elements with prefixes in them,
like:
...
<gml:name>Biggar</gml:name>
...
When I try to access this, i.e.:
<x:out
select="$doc/PostalCodeLookup/PostalCodeResultSet/PostalCode/gml:name"/>
..no value is present. This behaviour works fine with xpaths with no tags
containing prefixes, of course.
Any idea how to get this working with tags containing prefixes?
Thanks alot
..Tom
=========================
Tom Kralidis
Systems Scientist
Environment Canada
Tel: +01-905-336-4409
http://www.ec.gc.ca/cise/
=========================
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: xml selection of tags with namespace prefixes
Posted by "Ruth, Brice" <br...@fiskars.com>.
Does just using "name" in the XPath work?
Tom Kralidis [Burlington] wrote:
>Hi,
>
>I have a JSP file which fetches XML from a web service and parses
>accordingly. The response XML document has elements with prefixes in them,
>like:
>
>...
><gml:name>Biggar</gml:name>
>...
>
>When I try to access this, i.e.:
>
><x:out
>select="$doc/PostalCodeLookup/PostalCodeResultSet/PostalCode/gml:name"/>
>
>..no value is present. This behaviour works fine with xpaths with no tags
>containing prefixes, of course.
>
>Any idea how to get this working with tags containing prefixes?
>
>Thanks alot
>
>..Tom
>
>=========================
>Tom Kralidis
>Systems Scientist
>Environment Canada
>Tel: +01-905-336-4409
>http://www.ec.gc.ca/cise/
>=========================
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>
>
--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org