Popular Python recipes tagged "meta:requires=xml.dom"http://code.activestate.com/recipes/langs/python/tags/meta:requires=xml.dom/2014-06-15T03:17:19-07:00ActiveState Code RecipesConvert Wordpress Export File to multiple html files (Python)
2014-06-15T03:17:19-07:00rrebotohttp://code.activestate.com/recipes/users/4190203/http://code.activestate.com/recipes/578892-convert-wordpress-export-file-to-multiple-html-fil/
<p style="color: grey">
Python
recipe 578892
by <a href="/recipes/users/4190203/">rreboto</a>
(<a href="/recipes/tags/xml/">xml</a>).
</p>
<p>Converts Wordpress Export Files (XML) to multiple html files and optionally uses tags and authors to create a directory structure.</p>
Easy XML (Python)
2011-05-03T23:06:30-07:00Yony Kochinskihttp://code.activestate.com/recipes/users/4175703/http://code.activestate.com/recipes/577451-easy-xml/
<p style="color: grey">
Python
recipe 577451
by <a href="/recipes/users/4175703/">Yony Kochinski</a>
(<a href="/recipes/tags/xml/">xml</a>).
Revision 2.
</p>
<p>Being that I only use XML on occasion for some very basic features, I find myself having to re-learn the appropriate syntax every time. After doing this for the n-th time, I finally decided to wrap this syntax in something that's much more intuitive (to me, at least). The main goal is to make this as simple an API as possible, at the cost of some features.</p>
Convert Wordpress Export File to multiple html files (Python)
2008-03-24T04:57:36-07:00Luiss Reihttp://code.activestate.com/recipes/users/4136205/http://code.activestate.com/recipes/551792-convert-wordpress-export-file-to-multiple-html-fil/
<p style="color: grey">
Python
recipe 551792
by <a href="/recipes/users/4136205/">Luiss Rei</a>
(<a href="/recipes/tags/xml/">xml</a>).
</p>
<p>Converts Wordpress Export Files (XML) to multiple html files and optionally uses tags and authors to create a directory structure.</p>
Get Foreign Exchange Rates (Python)
2006-09-23T06:15:56-07:00Matt Keranenhttp://code.activestate.com/recipes/users/38288/http://code.activestate.com/recipes/498127-get-foreign-exchange-rates/
<p style="color: grey">
Python
recipe 498127
by <a href="/recipes/users/38288/">Matt Keranen</a>
.
Revision 2.
</p>
<p>Retrieve a list of the available exhange rates from the NY Federal Reserve, and create a list of US Dollar to currency multipliers.</p>
Add support for the "in" operator to the attributes map of minidom elements (Python)
2006-06-23T18:54:14-07:00Walker Halehttp://code.activestate.com/recipes/users/2928779/http://code.activestate.com/recipes/496817-add-support-for-the-in-operator-to-the-attributes-/
<p style="color: grey">
Python
recipe 496817
by <a href="/recipes/users/2928779/">Walker Hale</a>
(<a href="/recipes/tags/xml/">xml</a>).
Revision 2.
</p>
<p>When you parse XML using minidom, you can get a map of attributes for any element. The problem is that using the "in" operator on this map will raise an exception. These three lines of code will fix that.</p>
Covert Microsoft Office InfoPath 2003 files to CSV report (Python)
2005-11-02T13:18:49-08:00Anthony Barkerhttp://code.activestate.com/recipes/users/122940/http://code.activestate.com/recipes/442520-covert-microsoft-office-infopath-2003-files-to-csv/
<p style="color: grey">
Python
recipe 442520
by <a href="/recipes/users/122940/">Anthony Barker</a>
.
</p>
<p>I needed a quick hack to extract some data from MS InfoPath files stored on a file server. Infopath data files are stored as XML so it was fairly straight forward to extract the required information. The outputed file is report.csv and a log file is called reportlog.txt. It reads settings from config.ini.</p>
XMLMenuLoader creates a wx.MenuBar from an XML definition (Python)
2005-06-22T14:51:08-07:00Egor Zindyhttp://code.activestate.com/recipes/users/2493385/http://code.activestate.com/recipes/426409-xmlmenuloader-creates-a-wxmenubar-from-an-xml-defi/
<p style="color: grey">
Python
recipe 426409
by <a href="/recipes/users/2493385/">Egor Zindy</a>
.
</p>
<p>XMLMenuLoader uses XML definitions to create a wx.MenuBar. It is based on the code in this post:</p>
<p><a href="http://mail.python.org/pipermail/python-list/2001-June/046912.html" rel="nofollow">http://mail.python.org/pipermail/python-list/2001-June/046912.html</a></p>
<p>and adds checkable menus and submenus.</p>
mbsa2txt (Python)
2004-09-17T07:28:49-07:00Shannon Peeveyhttp://code.activestate.com/recipes/users/2042223/http://code.activestate.com/recipes/305302-mbsa2txt/
<p style="color: grey">
Python
recipe 305302
by <a href="/recipes/users/2042223/">Shannon Peevey</a>
(<a href="/recipes/tags/xml/">xml</a>).
</p>
<p>Reads the Microsoft Baseline Security Analyzer 1.2.1 XML output and sends it to standard output in a readable text format.</p>
SAX to DOM Chunker (Python)
2004-08-06T08:48:59-07:00Uche Ogbujihttp://code.activestate.com/recipes/users/509776/http://code.activestate.com/recipes/298343-sax-to-dom-chunker/
<p style="color: grey">
Python
recipe 298343
by <a href="/recipes/users/509776/">Uche Ogbuji</a>
(<a href="/recipes/tags/xml/">xml</a>).
</p>
<p>This module is similar to pulldom in that it takes a stream of SAX objects and breaks it down into chunks of DOM. The differences are that it works with any DOM implementation meeting the Python DOM conventions, and that it uses simple pattern expressions to declaratively set how the DOM chunks are partitioned, rather than requiring the user to write procedural code for this purpose. This is an updated/fixed version of code that appeared in an <a href="http://XML.com" rel="nofollow">XML.com</a> column.</p>
Merging XBEL Bookmark files (Python)
2002-06-23T14:46:14-07:00Uche Ogbujihttp://code.activestate.com/recipes/users/509776/http://code.activestate.com/recipes/135131-merging-xbel-bookmark-files/
<p style="color: grey">
Python
recipe 135131
by <a href="/recipes/users/509776/">Uche Ogbuji</a>
(<a href="/recipes/tags/xml/">xml</a>).
</p>
<p>This recipe uses DOM (precisely, cDomlette or the minidom variant in 4Suite) to merge two files containing XBEL boomark listings. It uses Python 2.2. generators for straightforward and efficient iteration over the XBEL DOM trees in document order. It requires Python 2.2 and 4Suite 0.12.0a2 or more recent versions.</p>