Package zeroinstall :: Package injector :: Module qdom
[frames] | no frames]

Module qdom

source code

A quick DOM implementation.

Python's xml.dom is very slow. The xml.sax module is also slow (as it imports urllib2). This is our light-weight version.

Classes
  Element
An XML element.
  QSAXhandler
SAXHandler that builds a tree of Elements
  Prefixes
Keep track of namespace prefixes.
Functions
Element
parse(source, filter_for_version=False)
Parse an XML stream into a tree of Elements.
source code
Function Details

parse(source, filter_for_version=False)

source code 

Parse an XML stream into a tree of Elements.

Parameters:
  • source (file) - data to parse
  • filter_for_version (bool) - skip elements if their if-0install-version attribute doesn't match zeroinstall.version (since 1.13).
Returns: Element
the root