You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Survey._to_pretty_xml pretty-prints XML output using a combination of minidom and regular expressions.
minidom formats the XML a bit, but also introduces some strange whitespace, which the regular expressions then attempt to clean up. While this is reasonably successful, it's not perfect. Simpler would be to use a different XML formatter to minidom which actually works out of the box.
One thing to think about (and test) when changing to a different library is whether its dependencies are able to be embedded in downstream applications successfully.
Survey._to_pretty_xml
pretty-prints XML output using a combination ofminidom
and regular expressions.minidom
formats the XML a bit, but also introduces some strange whitespace, which the regular expressions then attempt to clean up. While this is reasonably successful, it's not perfect. Simpler would be to use a different XML formatter tominidom
which actually works out of the box.The in-line TODO suggests checking out PyXML as per http://ronrothman.com/public/leftbraned/xml-dom-minidom-toprettyxml-and-silly-whitespace/#best-solution:
The text was updated successfully, but these errors were encountered: