xmllib
index
/usr/lib/python2.1/xmllib.py

A parser for XML, using the derived class as static DTD.

 
Modules
            
re
string

 
Classes
            
exceptions.RuntimeError(exceptions.StandardError)
Error
XMLParser
TestXMLParser

 
class Error(exceptions.RuntimeError)
       
  
__getitem__(...) from exceptions.Exception
__init__(...) from exceptions.Exception
__str__(...) from exceptions.Exception

 
class TestXMLParser(XMLParser)
       
  
_XMLParser__fixclass = __fixclass(self, kl) from XMLParser
_XMLParser__fixdict = __fixdict(self, dict) from XMLParser
_XMLParser__fixelements = __fixelements(self) from XMLParser
__init__(self, **kw)
close(self)
feed(self, data) from XMLParser
finish_endtag(self, tag) from XMLParser
finish_starttag(self, tagname, attrdict, method) from XMLParser
flush(self)
getnamespace(self) from XMLParser
goahead(self, end) from XMLParser
handle_cdata(self, data)
handle_charref(self, name) from XMLParser
handle_comment(self, data)
handle_data(self, data)
handle_doctype(self, tag, pubid, syslit, data)
handle_endtag(self, tag, method) from XMLParser
handle_proc(self, name, data)
handle_starttag(self, tag, method, attrs) from XMLParser
handle_xml(self, encoding, standalone)
parse_attributes(self, tag, i, j) from XMLParser
parse_cdata(self, i) from XMLParser
parse_comment(self, i) from XMLParser
parse_doctype(self, res) from XMLParser
parse_endtag(self, i) from XMLParser
parse_proc(self, i) from XMLParser
parse_starttag(self, i) from XMLParser
reset(self) from XMLParser
setliteral(self, *args) from XMLParser
setnomoretags(self) from XMLParser
syntax_error(self, message)
translate_references(self, data, all=1) from XMLParser
unknown_charref(self, ref)
unknown_endtag(self, tag)
unknown_entityref(self, ref)
unknown_starttag(self, tag, attrs)

 
class XMLParser
       
  
_XMLParser__fixclass = __fixclass(self, kl)
_XMLParser__fixdict = __fixdict(self, dict)
_XMLParser__fixelements = __fixelements(self)
__init__(self, **kw)
# Interface -- initialize and reset this instance
close(self)
# Interface -- handle the remaining data
feed(self, data)
# Interface -- feed some data to the parser.  Call this as
# often as you want, with as little or as much text as you
# want (may include '\n').  (This just saves the text, all the
# processing is done by goahead().)
finish_endtag(self, tag)
# Internal -- finish processing of end tag
finish_starttag(self, tagname, attrdict, method)
# Internal -- finish processing of start tag
getnamespace(self)
# Interface - return a dictionary of all namespaces currently valid
goahead(self, end)
# Internal -- handle data as far as reasonable.  May leave state
# and data to be processed by a subsequent call.  If 'end' is
# true, force handling all data as if followed by EOF marker.
handle_cdata(self, data)
# Example -- handle cdata, could be overridden
handle_charref(self, name)
# Example -- handle character reference, no need to override
handle_comment(self, data)
# Example -- handle comment, could be overridden
handle_data(self, data)
# Example -- handle data, should be overridden
handle_doctype(self, tag, pubid, syslit, data)
# Overridable -- handle DOCTYPE
handle_endtag(self, tag, method)
# Overridable -- handle end tag
handle_proc(self, name, data)
# Example -- handle processing instructions, could be overridden
handle_starttag(self, tag, method, attrs)
# Overridable -- handle start tag
handle_xml(self, encoding, standalone)
# Overridable -- handle xml processing instruction
parse_attributes(self, tag, i, j)
# Internal -- parse attributes between i and j
parse_cdata(self, i)
# Internal -- handle CDATA tag, return length or -1 if not terminated
parse_comment(self, i)
# Internal -- parse comment, return length or -1 if not terminated
parse_doctype(self, res)
# Internal -- handle DOCTYPE tag, return length or -1 if not terminated
parse_endtag(self, i)
# Internal -- parse endtag
parse_proc(self, i)
# Internal -- handle a processing instruction tag
parse_starttag(self, i)
# Internal -- handle starttag, return length or -1 if not terminated
reset(self)
# Interface -- reset this instance.  Loses all unprocessed data
setliteral(self, *args)
# For derived classes only -- enter literal mode (CDATA)
setnomoretags(self)
# For derived classes only -- enter literal mode (CDATA) till EOF
syntax_error(self, message)
# Example -- handle relatively harmless syntax errors, could be overridden
translate_references(self, data, all=1)
# Interface -- translate references
unknown_charref(self, ref)
unknown_endtag(self, tag)
unknown_entityref(self, name)
unknown_starttag(self, tag, attrs)
# To be overridden -- handlers for unknown objects

 
Functions
            
test(args=None)

 
Data
             _ExternalId = '(?:SYSTEM|PUBLIC[ \t\r\n]+(?P<pubid>"[-\'\\(\\)+,./:=?...A-Z0-9]*\'))[ \t\r\n]+(?P<syslit>(?:\'[^\']*\'|"[^"]*"))'
_NCName = '[a-zA-Z_][-a-zA-Z0-9._]*'
_Name = '[a-zA-Z_:][-a-zA-Z0-9._:]*'
_PublicLiteral = '(?P<%s>"[-\'\\(\\)+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*"|\'[-\\(\\)+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*\')'
_QStr = '(?:\'[^\']*\'|"[^"]*")'
_S = '[ \t\r\n]+'
_SystemLiteral = '(?P<%s>(?:\'[^\']*\'|"[^"]*"))'
__file__ = '/usr/lib/python2.1/xmllib.pyc'
__name__ = 'xmllib'
_opS = '[ \t\r\n]*'
amp = <SRE_Pattern object>
attrfind = <SRE_Pattern object>
attrtrans = '\x00\x01\x02\x03\x04\x05\x06\x07\x08 \x0b\x0c \x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./...\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'
cdataclose = <SRE_Pattern object>
cdataopen = <SRE_Pattern object>
charref = <SRE_Pattern object>
commentclose = <SRE_Pattern object>
commentopen = <SRE_Pattern object>
doctype = <SRE_Pattern object>
doubledash = <SRE_Pattern object>
endbracket = <SRE_Pattern object>
endbracketfind = <SRE_Pattern object>
endtagopen = <SRE_Pattern object>
entityref = <SRE_Pattern object>
illegal = <SRE_Pattern object>
interesting = <SRE_Pattern object>
ncname = <SRE_Pattern object>
newline = <SRE_Pattern object>
procclose = <SRE_Pattern object>
procopen = <SRE_Pattern object>
qname = <SRE_Pattern object>
ref = <SRE_Pattern object>
space = <SRE_Pattern object>
starttagend = <SRE_Pattern object>
starttagmatch = <SRE_Pattern object>
starttagopen = <SRE_Pattern object>
tagfind = <SRE_Pattern object>
version = '0.3'
xmldecl = <SRE_Pattern object>
xmlns = <SRE_Pattern object>