From Java to Python
Pages
Home
Thursday, April 17, 2014
Python: get the sub-elements of a xml element
According to
Python XML ElementTree API
,
get all sub-elements(descendants):
all_descendants = list(element.iter())
get direct sub-elements(children):
children = list(element)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment