Skip to content
Snippets Groups Projects

Release 0.9.0

Merged Florian Spreckelsen requested to merge release-0.9.0 into main
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
@@ -93,7 +93,7 @@ class XMLTagConverter(Converter):
tags_as_children: true # _true_ / false
The default is to generate the tags matched by the xpath expression only.
- When text_as_children is set to true, text nodes will be generated that contain the text
contained in the matched tags.
- When attribs_as_children is set to true, attribute nodes will be generated from the attributes
@@ -129,7 +129,8 @@ class XMLTagConverter(Converter):
el_lst = []
for el in children:
if isinstance(el, str):
raise RuntimeError("Only standard xml nodes are supported as results of xpath queries.")
raise RuntimeError(
"Only standard xml nodes are supported as results of xpath queries.")
elif isinstance(el, lxml.etree._Element):
if self.definition.get("tags_as_children", True):
el_lst.append(XMLTagElement(el))
Loading