Re: [xml] XPath question



On Mon, May 10, 2004 at 12:09:41PM -0400, Ed Day wrote:
I am relatively new to XPath, so perhaps there is something I don't
understand here.  I am using the following XPath expression:

/MyElement

to try and match the following simple node:

<MyElement
xmlns="http://test.commerceone.com/global_element/SimpleTypeNested";>true</My
Element>

This is coming back as a non-match. Apparently something in the namespace
declaration is causing this.  If I remove that, or replace it with an

  And this is coming back as XPath #1 FAQ. A default namespace is a 
namespace and /MyElement won't select a namespaced element by definition
of the XPath language. Check the archives 

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]