[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XPath and root-less namespace problem

Subject: RE: XPath and root-less namespace problem
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Thu, 15 May 2003 21:28:09 +0100
xpath namespace java
> > 
> > My XPath of:
> > 
> >     //definitions/service/port[@name='IZPOP3service']/*/@location
> > 
> > returns nothing.
> > 
> > However, if I remove the
> > "xmlns='http://schemas.xmlsoap.org/wsdl'" from my
> > code, it works BEAUTIFULLY. 
> 
>   //x:definitions/x:service/x:port[@name='IZPOP3service']/*/@location
> 
> with ns-prefix x bound to URL 
> http://schemas.xmlsoap.org/wsdl/ will work.
> 
> 
> Great.  How do I do this programmatically in Java?
> 

It rather depends on what Java API you are using. There is no standard
Java API for XPath processing, but all the various APIs that I have seen
provide some mechanism for binding namespaces.

Michael Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.