children
attribute should not contain descendants. It never really did but since YAXL Element
s are represented as XML fragments, it may have seemed that way. Here's what an interactive session looks like:
>>> import yaxl
>>> x = yaxl.Element('x')
>>> x.append('y').append('z').append('w')
<w />
>>> x.children
[<y><z><w /></z></y>]
It may seem from the output that the
z
and w
elements are returned as part of children
but they are just part of the XML fragment that y
outputs.In the latest release (0.0.6) you can also "call" the element with an XPath of
child::*
and get back a list of immediate children.
No comments:
Post a Comment