Le 09/06/2015 13:13, Samuel Gougeon a écrit :
.../...
I would have expected that .name and .content be usable on e, but previous trials showed that it is/was not the case
.
-->e = doc.root.children(1).attributes
 e  =

XML Attributes
att --> foo
rib --> bar

-->e.name
 ans  =
     []

-->e.content
 ans  =
     []
It would be quite intuitive and more straightforward.
.
OK, i have just caught why this is not implemented as this:
e being an XML attribute object, e.mystring points to the value of the attribute named myString. So, e.name and e.content point to the value of attributes named "name" and "content", as in <myTag name="test" content="value">bla bla</myTag>

I don't know well XML conventions for attributes names. I am pretty sure that attributes names should exclude some special chars like "&" or some others. So, addressing the names could be done through e.name& and values through e.value& ... without having to use xmlXPath(). A proposal.

Samuel

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to