Package twisted :: Package web :: Module microdom :: Class MicroDOMParser
[show private | hide private]
[frames | no frames]

Class MicroDOMParser

BaseProtocol --+        
               |        
        Protocol --+    
                   |    
           XMLParser --+
                       |
                      MicroDOMParser


Method Summary
  __init__(self, beExtremelyLenient, caseInsensitive, preserveCase)
  begin_afterslash(self, byte)
(inherited from XMLParser)
  begin_attrname(self, byte)
(inherited from XMLParser)
  begin_attrval(self, byte)
(inherited from XMLParser)
  begin_beforeeq(self, byte)
(inherited from XMLParser)
  begin_bodydata(self, byte)
(inherited from XMLParser)
  begin_comment(self, byte)
(inherited from XMLParser)
  begin_doctype(self, byte)
(inherited from XMLParser)
  begin_entityref(self, byte)
(inherited from XMLParser)
  begin_expectcdata(self, byte)
(inherited from XMLParser)
  begin_messyattr(self, byte)
(inherited from XMLParser)
  begin_tagstart(self, byte)
(inherited from XMLParser)
  connectionFailed(self)
(Deprecated) (inherited from Protocol)
  connectionLost(self, reason)
Called when the connection is shut down.
  connectionMade(self)
Called when a connection is made. (inherited from XMLParser)
  dataReceived(self, data)
Called whenever data is received. (inherited from XMLParser)
  do_afterslash(self, byte)
(inherited from XMLParser)
  do_attrname(self, byte)
(inherited from XMLParser)
  do_attrs(self, byte)
(inherited from XMLParser)
  do_attrval(self, byte)
(inherited from XMLParser)
  do_beforeattrval(self, byte)
(inherited from XMLParser)
  do_beforeeq(self, byte)
(inherited from XMLParser)
  do_begin(self, byte)
(inherited from XMLParser)
  do_bodydata(self, byte)
(inherited from XMLParser)
  do_cdata(self, byte)
(inherited from XMLParser)
  do_comment(self, byte)
(inherited from XMLParser)
  do_doctype(self, byte)
(inherited from XMLParser)
  do_entityref(self, byte)
(inherited from XMLParser)
  do_expectcdata(self, byte)
(inherited from XMLParser)
  do_messyattr(self, byte)
(inherited from XMLParser)
  do_tagstart(self, byte)
(inherited from XMLParser)
  do_waitforgt(self, byte)
(inherited from XMLParser)
  end_attrval(self)
(inherited from XMLParser)
  end_bodydata(self)
(inherited from XMLParser)
  end_cdata(self)
(inherited from XMLParser)
  end_doctype(self)
(inherited from XMLParser)
  end_entityref(self)
(inherited from XMLParser)
  end_messyattr(self)
(inherited from XMLParser)
  gotCData(self, cdata)
Encountered CDATA
  gotComment(self, data)
  gotDoctype(self, doctype)
Encountered DOCTYPE
  gotEntityReference(self, entityRef)
Encountered mnemonic entity reference
  gotTagEnd(self, name)
Encountered closing tag
  gotTagStart(self, name, attributes)
Encountered an opening tag.
  gotText(self, data)
Encountered text
  makeConnection(self, transport)
Make a connection to a transport and a server. (inherited from BaseProtocol)
  saveMark(self)
Get the line number and column of the last character parsed (inherited from XMLParser)
  shouldPreserveSpace(self)
  _buildStateTable(self)
Return a dictionary of begin, do, end state function tuples (inherited from XMLParser)
  _decode(self, data)
(inherited from XMLParser)
  _getparent(self)
  _gotStandalone(self, factory, data)
  _parseError(self, message)
(inherited from XMLParser)

Class Variable Summary
dictionary laterClosers
list soonClosers
dictionary _XMLParser__stateTable

Method Details

connectionLost(self, reason)

Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.
Parameters:
reason
           (type=twisted.python.failure.Failure)
Overrides:
twisted.internet.protocol.Protocol.connectionLost (inherited documentation)

gotCData(self, cdata)

Encountered CDATA

Default behaviour is to call the gotText method
Overrides:
twisted.protocols.sux.XMLParser.gotCData (inherited documentation)

gotDoctype(self, doctype)

Encountered DOCTYPE

This is really grotty: it basically just gives you everything between '<!DOCTYPE' and '>' as an argument.
Overrides:
twisted.protocols.sux.XMLParser.gotDoctype (inherited documentation)

gotEntityReference(self, entityRef)

Encountered mnemonic entity reference

Default behaviour is to print.
Overrides:
twisted.protocols.sux.XMLParser.gotEntityReference (inherited documentation)

gotTagEnd(self, name)

Encountered closing tag

Default behaviour is to print.
Overrides:
twisted.protocols.sux.XMLParser.gotTagEnd (inherited documentation)

gotTagStart(self, name, attributes)

Encountered an opening tag.

Default behaviour is to print.
Overrides:
twisted.protocols.sux.XMLParser.gotTagStart (inherited documentation)

gotText(self, data)

Encountered text

Default behaviour is to print.
Overrides:
twisted.protocols.sux.XMLParser.gotText (inherited documentation)

Class Variable Details

laterClosers

Type:
dictionary
Value:
{'col': ['col'],
 'colgroup': ['colgroup'],
 'dd': ['dt', 'dd'],
 'dt': ['dt', 'dd'],
 'head': ['body'],
 'li': ['li'],
 'p': ['p'],
 'tbody': ['thead', 'tfoot', 'tbody'],
...                                                                    

soonClosers

Type:
list
Value:
['area', 'link', 'br', 'img', 'hr', 'input', 'option', 'base', 'meta'] 

_XMLParser__stateTable

Type:
dictionary
Value:
{'afterslash': (<method XMLParser.begin_afterslash of MicroDOMParser i\
nstance at 0x88d4d5c>,
                <method XMLParser.do_afterslash of MicroDOMParser inst\
ance at 0x88d4d5c>,
                <function nop at 0x824fa14>),
 'attrname': (<method XMLParser.begin_attrname of MicroDOMParser insta\
nce at 0x88d4d5c>,
              <method XMLParser.do_attrname of MicroDOMParser instance\
...                                                                    

Generated by Epydoc 1.1 on Thu Apr 17 12:56:21 2003 http://epydoc.sf.net