xmllib
index
/usr/lib/python1.6/xmllib.py

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

 
Modules
            
re
string

 
Classes
            
XMLParser
TestXMLParser

 
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)
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
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[ \011\015\012]+(?P<pubid>"[-\'()+,./:=?;!...A-Z0-9]*\'))[ \011\015\012]+(?P<syslit>(?:\'[^\']*\'|"[^"]*"))'
_NCName = '[a-zA-Z_][-a-zA-Z0-9._]*'
_Name = '[a-zA-Z_:][-a-zA-Z0-9._:]*'
_PublicLiteral = '(?P<%s>"[-\'()+,./:=?;!*#@$_%% \012\015a-zA-Z0-9]*"|\'[-()+,./:=?;!*#@$_%% \012\015a-zA-Z0-9]*\')'
_QStr = '(?:\'[^\']*\'|"[^"]*")'
_S = '[ \011\015\012]+'
_SystemLiteral = '(?P<%s>(?:\'[^\']*\'|"[^"]*"))'
__file__ = '/usr/lib/python1.6/xmllib.pyc'
__name__ = 'xmllib'
_opS = '[ \011\015\012]*'
amp = <SRE_Pattern object at 85a7858>
attrfind = <SRE_Pattern object at 856de08>
attrtrans = '\000\001\002\003\004\005\006\007\010 \013\014 \016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !"#$%&\'()*+,-./...\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377'
cdataclose = <SRE_Pattern object at 84ce878>
cdataopen = <SRE_Pattern object at 869da80>
charref = <SRE_Pattern object at 8673a28>
commentclose = <SRE_Pattern object at 8543900>
commentopen = <SRE_Pattern object at 8542570>
doctype = <SRE_Pattern object at 8703108>
doubledash = <SRE_Pattern object at 8651118>
endbracket = <SRE_Pattern object at 85b0f10>
endbracketfind = <SRE_Pattern object at 866ef50>
endtagopen = <SRE_Pattern object at 84cdb78>
entityref = <SRE_Pattern object at 8679018>
illegal = <SRE_Pattern object at 8612b60>
interesting = <SRE_Pattern object at 861d0b8>
ncname = <SRE_Pattern object at 86ce358>
newline = <SRE_Pattern object at 85a8a28>
procclose = <SRE_Pattern object at 86405d8>
procopen = <SRE_Pattern object at 863be18>
qname = <SRE_Pattern object at 86db190>
ref = <SRE_Pattern object at 86e72a0>
space = <SRE_Pattern object at 86d21a8>
starttagend = <SRE_Pattern object at 86edd60>
starttagmatch = <SRE_Pattern object at 86f3eb0>
starttagopen = <SRE_Pattern object at 840a228>
tagfind = <SRE_Pattern object at 867ee80>
version = '0.3'
xmldecl = <SRE_Pattern object at 87149a8>
xmlns = <SRE_Pattern object at 872e4c0>