[Scilab-users] xmlXPath query

Samuel Gougeon sgougeon at free.fr
Mon Mar 2 23:06:44 CET 2015


Hello Calixte,

Le 01/03/2015 21:30, Calixte Denizet a écrit :
> .../...
>> -->e = xmlXPath(doc, "//itag[@target=""valueA2""]") // works:
>>  e  =
>> XML List
>> size: 1
>>
>
> you got a list with one element
>
>> but e has no attributes fields. So i cannot get its url contents:
>> -->e.name
>>  ans  =
>>  itag
>
> e(1).name
>
> fyi e.name is a shortcut to get all the nodes name in the list.

Aaa! Since e.name was working, i tried  e.attributes, e.type, e.parent, 
yielding errors.
Even e.children returned an error, taking me away from index addressing.
In some way, shortcuting e(*).name in e.name without finding the same 
with e(*).children etc... misled me.

Thanks for this surprising trick.

Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20150302/2feff143/attachment.htm>


More information about the users mailing list