The function reparsed_tag() is used in the Crossref generation project, and I also want to use it in the decision letter parser project, hence moving it to this project into the xmlio.py module, which is concerned with XML input / output.
Also through some testing of real input, I noticed the attributes of tags added using the existing append_minidom_xml_to_elementtree_xml() function were not retained. I enhanced the logic for it, and I added a child_attributes parameter so it will be backwards-compatible in case some other project expected the tag attributes to be stripped away. I changed the test scenario to include tag attributes (<i id="test">) to make sure it had test coverage.
Coverage increased (+0.001%) to 99.564% when pulling f479726f344087a146247ec9984a37a808a16131 on xmlio into 7f6f7d6210a731ec62c26ccbe92e86212e8f982e on develop.
Re issue https://github.com/elifesciences/elife-tools/issues/313
The function
reparsed_tag()
is used in the Crossref generation project, and I also want to use it in the decision letter parser project, hence moving it to this project into thexmlio.py
module, which is concerned with XML input / output.Also through some testing of real input, I noticed the attributes of tags added using the existing
append_minidom_xml_to_elementtree_xml()
function were not retained. I enhanced the logic for it, and I added achild_attributes
parameter so it will be backwards-compatible in case some other project expected the tag attributes to be stripped away. I changed the test scenario to include tag attributes (<i id="test">
) to make sure it had test coverage.