Jul-18-2017, 03:18 PM
I have a large XML document and am able to process the data ok.
I can make it more efficient if I do my find_all statements on only tags
that are direct children, and not grand children of the node of interest.
the following statement gets me all tags of the parent:
How can I adjust it so that I only find immediate children tags?
I can make it more efficient if I do my find_all statements on only tags
that are direct children, and not grand children of the node of interest.
the following statement gets me all tags of the parent:
tags = [tag.name for tag in one_entry.find_all()]but includes grandchildren tags.
How can I adjust it so that I only find immediate children tags?