Package common :: 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)
Return 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)
Convert supplied textual string into XML node.
source code
 
BadXML2Node(xml)
Convert supplied textual string into XML node.
source code
Variables [hide private]
  log = logging.getLogger('gajim.c.x.simplexml')
  ENCODING = 'utf-8'

Imports: xml, logging


Function Details [hide private]

XMLescape(txt)

source code 
Return provided string with symbols & < > " replaced by their respective XML entities

ustr(what)

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

XML2Node(xml)

source code 
Convert 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 
Convert 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

Variables Details [hide private]

log

Value:
logging.getLogger('gajim.c.x.simplexml')

ENCODING

Value:
'utf-8'