[xml] XPATH question when used with namespace



When accessing any given element name within a tree document, the
element name stored within xmlNodePtr->name is the element name without
the namespace, as one would expect.
 
But with XPATH, when trying to access a particular element nodeset that
is part of a namespace, the only solution I came upon was to use the
contains clause. Is this normal behavior for XPATH or a Gnome feature?
Given the following document hierarchy here is my query:
 
Envelope-Request
    Input-Parameters
         ds:Dataset
              ds:Row
  
XPATH QUERY:
"//Envelope-Request/Input_Parameters/*[contains(name(),'ds:Dataset')]/*[contains(name(),'ds:Row')]"
 
The above query was the only solution I discovered to access the
"ds:Row" nodeset 
 
Any clarification appreciated.

Chris Coy




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