Hi, Luís,
>
>
>m.OROOT.selectNodes("Documento/dataobra").item(0).text
>
>When i must used .item(x), always ? and it´s refer to content of my xml Tag ?
When you call the selectNodes method, you get in return a list of nodes.
item(0) refers to the first element of the list (which will be .NULL., in case of a list of length zero), and
item(0).text refers to the textual contents of the element (that may even be a complex element, comprising a segment of the XML tree and various sub-elements).
>Could you post a very, very smal example about using : verify the length of a node selection.
m.nodelist = m.OROOT.selectNodes("Documento/dataobra")
IF m.nodelist.length == 0
ELSE
m.dataobra = m.nodelist.item(0).text
ENDIF
(of course, you may define a function to ease the repetition of the construction).
Hope it helps!
Hi António,
thank you Antonio, without a doubt it helped me a lot to understand better how to do it!
Many thanks,
Best regards,
Luis