Popular recipes tagged "meta:requires=xml.parsers.expat"http://code.activestate.com/recipes/tags/meta:requires=xml.parsers.expat/2012-05-18T14:34:13-07:00ActiveState Code Recipesgprof2dot.py (Python)
2012-05-18T14:34:13-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578138-gprof2dotpy/
<p style="color: grey">
Python
recipe 578138
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
(<a href="/recipes/tags/profiling/">profiling</a>, <a href="/recipes/tags/tools/">tools</a>, <a href="/recipes/tags/visualization/">visualization</a>).
</p>
<p>This is the <code>gprof2dot.py</code> program converted for use with the latest version of Python (3.2). It generates a dot graph from the output of several profilers. Please observe the original License embedded by the author, Jose Fonseca. His website for this program can be found on <a href="http://code.google.com/p/jrfonseca/wiki/Gprof2Dot">Google Code</a>.</p>
Read OpenOffice Spreadsheet as list of lists (without UNO) (Python)
2005-11-28T11:34:46-08:00Romano Giannettihttp://code.activestate.com/recipes/users/2508634/http://code.activestate.com/recipes/436066-read-openoffice-spreadsheet-as-list-of-lists-witho/
<p style="color: grey">
Python
recipe 436066
by <a href="/recipes/users/2508634/">Romano Giannetti</a>
(<a href="/recipes/tags/text/">text</a>).
Revision 3.
</p>
<p>This is a quick-and-dirty snippet that read a OpenOffice 1.1 spreadsheet (.sxc files) as a list of lists, every list representing a oocalc row. The row contents are unicode object with the "string" content of the cell. This snippet used as a program will convert .sxc files into comma-separated-values (csv) on the command line. Style is not perfect and could be greatly enhanced, but it works for me as is...</p>
Parsing an XML file with xml.parsers.expat (Python)
2001-07-27T15:31:46-07:00Mark Nenadovhttp://code.activestate.com/recipes/users/114221/http://code.activestate.com/recipes/65248-parsing-an-xml-file-with-xmlparsersexpat/
<p style="color: grey">
Python
recipe 65248
by <a href="/recipes/users/114221/">Mark Nenadov</a>
(<a href="/recipes/tags/xml/">xml</a>).
Revision 4.
</p>
<p>This is a reusable way to use "xml.parsers.expat" to parse an XML file. When re-using the "MyXML" class, all you need to define a new class, with "MyXML" as the parent. Once you have done that, all you have to do is overwrite the inherited XML handlers and you are ready to go.</p>