Package xmpp :: Module simplexml
[show private | hide private]
[frames | no frames]

Module xmpp.simplexml

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
Node Node class describes syntax of separate XML Node.
NodeBuilder Builds a Node class minidom from data parsed to it.
NT Auxiliary class used to quick create node's child nodes.
T Auxiliary class used to quick acces to node's child nodes.

Function Summary
  BadXML2Node(xml)
Converts supplied textual string into XML node.
  ustr(what)
Converts object "what" to unicode string using it's own __str__ method if accessible or unicode method otherwise.
  XML2Node(xml)
Converts supplied textual string into XML node.
  XMLescape(txt)
Returns provided string with symbols & < > " replaced by their respective XML entities.

Variable Summary
str DBG_NODEBUILDER = 'nodebuilder'
str ENCODING = 'utf-8'

Function Details

BadXML2Node(xml)

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.

ustr(what)

Converts object "what" to unicode string using it's own __str__ method if accessible or unicode method otherwise.

XML2Node(xml)

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.

XMLescape(txt)

Returns provided string with symbols & < > " replaced by their respective XML entities.

Variable Details

DBG_NODEBUILDER

Type:
str
Value:
'nodebuilder'                                                          

ENCODING

Type:
str
Value:
'utf-8'                                                                

Generated by Epydoc 2.1 on Sun Dec 26 09:52:57 2004 http://epydoc.sf.net