Package xmpp :: Module simplexml

[hide private]
[frames] | no frames]

# Module simplexml

source code
Simplexml module provides xmpppy library with all needed tools to handle XML nodes and XML streams. I'm personally using it in many other separate projects. It is designed to be as standalone as possible.

Classes | [hide private]

| Node Node class describes syntax of separate XML Node.
| T Auxiliary class used to quick access to node's child nodes.
| NT Auxiliary class used to quick create node's child nodes.
| NodeBuilder Builds a Node class minidom from data parsed to it.

Functions | [hide private]

XMLescape(txt) Returns provided string with symbols & < > " replaced by their respective XML entities. | source code

ustr(what) Converts object "what" to unicode string using it's own __str__ method if accessible or unicode method otherwise. | source code

XML2Node(xml) Converts supplied textual string into XML node. | source code

BadXML2Node(xml) Converts supplied textual string into XML node. | source code

Variables | [hide private]

| ENCODING = ``'``utf-8``'``
| DBG_NODEBUILDER = ``'``nodebuilder``'``

Function Details | [hide private]

### XML2Node(xml)

source code

Converts supplied textual string into XML node. Handy f.e. for reading configuration file. Raises xml.parser.expat.parsererror if provided string is not well-formed XML.

### BadXML2Node(xml)

source code

Converts supplied textual string into XML node. Survives if xml data is cutted half way round. I.e. "<html>some text <br>some more text". Will raise xml.parser.expat.parsererror on misplaced tags though. F.e. "<b>some text <br>some more text</b>" will not work.