xml - xpath combined with local-name and arrays -


i have , selects in xml 'documentnature'

//*[local-name()='documentnature']  

this returning 2 rows because have 2 xmls , return first 1 kind (but not work):

//*[local-name()='documentnature'][0] 

how should ? thanks

unlike many other programming languages, in xpath positions in node list starting 1. use this:

//*[local-name()='documentnature'][1] 

if want select first element having local-name.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -