Hi, I'm currently seeking a python script that provides a way of optimizing out useless characters in an XML document to provide the optimal size for the file. For example, assume the following XML script:
<root> <Test></Test> <!-- <CommentedOutElement/> --> <!-- Do Something Else --> </root> By running this through an XML optimizer, the file would appear as: <root><Test/></root> Note that the following were changed: - All comments were stripped from the XML - All spaces, tabs, carriage returns, and other forms of unimportant whitespace are removed - Elements that contain no text or children that are in the form of <Empty></Empty> use the short-hand method for ending an element body: <Empty/> Anyone know of a tool or python script that can perform optimizations like explained above? I realize I could probably do this with regular expressions in python, however I was hoping someone already did this work.
-- http://mail.python.org/mailman/listinfo/python-list