2

Can anyone tell me how can I get the xpath of the name attribute from this file:

<asmv1:assembly xmlns:asmv1="urn:schemas-microsoft-com:asm.v1">
  <assemblyIdentity name="MyName"/>
</asmv1:assembly>

I'm trying to get it for nant xmlpoke task without success.

Thanks.

Meidan Alon
  • 3,074
  • 7
  • 45
  • 63

2 Answers2

4

This should do the trick:

//asmv1:assembly/asmv1:assemblyIdentity/@name
Jeff Yates
  • 61,417
  • 20
  • 137
  • 189
1

Try this XPath

/*[local-name()='assembly']/assemblyIdentity/@name
joegtp
  • 712
  • 6
  • 17