Xpath expression disrupted by the xml name space

Here is the snippet below, and I want to retrieve only the elements starting with "valore",

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<documento xmlns="ArgoRef.dtd" xsi:schemaLocation="ArgoRef.dtd ArgoRef.xsd" xmlns:xsi="www.w3.org/.../XMLSchema-instance">
 <riga idmod="4" id="60761" idlang="7">
  <valore1>Symbol</valore1>
  <refv1>Symbol</refv1>
  <valore2>Name</valore2>
  <refv2>Name</refv2>
  <valore3>Description</valore3>
  <refv3>Description</refv3>
  <valore4 />
  <refv4 />
  <valore5 />
  <refv5 />
  <valore6 />
  <refv6 />
  <valore7 />
  <refv7 />
  <valore8 />
  <refv8 />
  <valore9 />
  <refv9 />
  <valore10 />
  <refv10 />
  <valore11 />
  <refv11 />
  <valore12 />
  <refv12 />
  <valore13 />
  <refv13 />
  <valore14 />
  <refv14 />
  <valore15 />
  <refv15 />
  <valore16 />
  <refv16 />
  <valore17 />
  <refv17 />
  <valore18 />
  <refv18 />
  <valore19 />
  <refv19 />
  <valore20 />
  <refv20 />
 </riga>
</documento>

I wrote the xpath as //*[starts-with(name(),'valore')] which does not work. Nevertheness when I remove the name space staff in the root element, which left the second line as <documento>, the xpath expression works again.

How can I refine the xpath expression to work well with the name space kept?

Parents Reply Children