| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
nsparser
very simple parser for XML
emits events like SAX, except the API is a lot ('even' ;) simpler
|
|||
|
__init__(self,
handler) x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
||
|
parse(self,
xml) parse the xml using self.handler |
||
|
_handle_pis(self,
xml) handle processing instructions |
||
| _parse_into_chunks(self, xml) | ||
| _parse_start(self, lineno, data) | ||
|
_test(self,
assertion,
lineno,
message) raises an exception with message as text when assertion is false |
||
|
Inherited from |
|||
|
|||
|
TYPE_TEXT = 1
|
||
|
TYPE_START = 2
|
||
|
TYPE_END = 3
|
||
|
TYPE_COMMENT = 4
|
||
|
TYPE_CDATA = 5
|
||
|
_reg_name = <_sre.SRE_Pattern object at 0x1728da0>
|
||
|
_reg_start = <_sre.SRE_Pattern object at 0x16264f0>
|
||
|
_reg_attr = <_sre.SRE_Pattern object at 0x15453e0>
|
||
|
_reg_xml_decl = <_sre.SRE_Pattern object at 0x159bbd8>
|
||
|
_reg_encoding = <_sre.SRE_Pattern object at 0x1705368>
|
||
|
_reg_pi = <_sre.SRE_Pattern object at 0x1728e00>
|
||
|
_reg_dtd_1 = <_sre.SRE_Pattern object at 0x152cb80>
|
||
|
_reg_dtd_2 = <_sre.SRE_Pattern object at 0x163b110>
|
||
|
|||
|
Inherited from |
|||
|
|||
|
parse the xml using self.handler xml is supposed to be either a unicode or ascii string, or a string with the character set as defined in the xml declaration |
handle processing instructions takes care of handling (if appropriate) the XML declaration, and of discarding any processing instructions and document type declarations etc. the lib can't deal with returns unicode, if the input string is not already unicode the charset mentioned in the XML declaration will be used for conversion (if any) |
|
|
|
|
|||
TYPE_TEXTNone
|
TYPE_STARTNone
|
TYPE_ENDNone
|
TYPE_COMMENTNone
|
TYPE_CDATANone
|
_reg_nameNone
|
_reg_startNone
|
_reg_attrNone
|
_reg_xml_declNone
|
_reg_encodingNone
|
_reg_piNone
|
_reg_dtd_1None
|
_reg_dtd_2None
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0alpha3 on Mon Nov 13 21:49:09 2006 | http://epydoc.sourceforge.net |