Hi Edwin,
You're right my elements are in the default namespace.
 
I have another question, is it possible to change an attribute in an xml document without passing by (using) its node but its xpath...i mean, is there methods that do this:
 
myDocument.setAttributeValueMethod( getAttributeByXpath( AttributeXPath ), value);
 
Thanks for your help
Bader
 
On 8/19/05, Edwin Dankert <[EMAIL PROTECTED]> wrote:
I think your elements are in the default namespace.

An example:

<test xmlns=" http://www.test.org/">
<parent>
   <child/>
   <child/>
</parent>
</test>

The _expression_ '//child' returns nothing because it is looking
for all 'child' elements that are not declared in a namespace.

However the _expression_ //*[name()='child'] will return the
elements because it is looking for all elements with a name
of 'child'.

As you see the expressions are not equivalent.

Regards,
Edwin

http://www.edankert.com/

Reply via email to