This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This module enhances minidom and will allow you to have ordered attributes instead of having them sorted automaticaly.

It is relevent in the fact that you may want to script the loading/modification/saving of xml files and then print out a diff. with the normal minidom since attributes are sorted automaticaly you can have an unwanted diff for each unchaged line just because the order of the attributes changed.

once you load this module, just use minidom normaly.

example:

>>> from xml.dom import minidom
>>> import enhancedminidom

then use minidom normaly except that:

  • Document and Element classes have a ‘getElementsByAttributeName’ method which can be verry handy.
  • ‘toxml’ and ‘toprettyxml’ will print attributes in the order they are created/loaded if ‘minidom.SORTEDATTRIBUTES = False’ (default)

example to get all nodes having a “foo” attribute:

>>> document = minidom.parse('yourfile.xml')
>>> nodes_with_foo = document.getElementsByAttributeName('foo')

example to get all nodes having a “foo” attribute if they are in a “fum” tag:

>>> document = minidom.parse('yourfile.xml')
>>> nodes_with_foo = document.getElementsByAttributeName('foo', 'fum')

Release Notes :

Release 0.1:

First Version

Release 0.2:

Fixed a typo in this doc

Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
enhancedminidom-0.2.zip (3.0 kB) Copy SHA256 Checksum SHA256 Source Feb 17, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting