Back to index

python3.2  3.2.2
Public Member Functions | Private Attributes
xml.sax.xmlreader.XMLReader Class Reference
Inheritance diagram for xml.sax.xmlreader.XMLReader:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def parse
def getContentHandler
def setContentHandler
def getDTDHandler
def setDTDHandler
def getEntityResolver
def setEntityResolver
def getErrorHandler
def setErrorHandler
def setLocale
def getFeature
def setFeature
def getProperty
def setProperty

Private Attributes

 _cont_handler
 _dtd_handler
 _ent_handler
 _err_handler

Detailed Description

Interface for reading an XML document using callbacks.

XMLReader is the interface that an XML parser's SAX2 driver must
implement. This interface allows an application to set and query
features and properties in the parser, to register event handlers
for document processing, and to initiate a document parse.

All SAX interfaces are assumed to be synchronous: the parse
methods must not return until parsing is complete, and readers
must wait for an event-handler callback to return before reporting
the next event.

Definition at line 11 of file xmlreader.py.


Constructor & Destructor Documentation

Definition at line 24 of file xmlreader.py.

Here is the caller graph for this function:


Member Function Documentation

Definition at line 34 of file xmlreader.py.

00034 
00035     def getContentHandler(self):
00036         "Returns the current ContentHandler."
00037         return self._cont_handler

Definition at line 42 of file xmlreader.py.

00042 
00043     def getDTDHandler(self):
00044         "Returns the current DTD handler."
00045         return self._dtd_handler

Definition at line 50 of file xmlreader.py.

00050 
00051     def getEntityResolver(self):
00052         "Returns the current EntityResolver."
00053         return self._ent_handler

Definition at line 58 of file xmlreader.py.

00058 
00059     def getErrorHandler(self):
00060         "Returns the current ErrorHandler."
00061         return self._err_handler

def xml.sax.xmlreader.XMLReader.getFeature (   self,
  name 
)

Reimplemented in xml.sax.saxutils.XMLFilterBase, and xml.sax.expatreader.ExpatParser.

Definition at line 75 of file xmlreader.py.

00075 
00076     def getFeature(self, name):
00077         "Looks up and returns the state of a SAX2 feature."
00078         raise SAXNotRecognizedException("Feature '%s' not recognized" % name)

def xml.sax.xmlreader.XMLReader.getProperty (   self,
  name 
)

Reimplemented in xml.sax.saxutils.XMLFilterBase, and xml.sax.expatreader.ExpatParser.

Definition at line 83 of file xmlreader.py.

00083 
00084     def getProperty(self, name):
00085         "Looks up and returns the value of a SAX2 property."
00086         raise SAXNotRecognizedException("Property '%s' not recognized" % name)

def xml.sax.xmlreader.XMLReader.parse (   self,
  source 
)

Reimplemented in xml.sax.saxutils.XMLFilterBase, xml.sax.xmlreader.IncrementalParser, and xml.sax.expatreader.ExpatParser.

Definition at line 30 of file xmlreader.py.

00030 
00031     def parse(self, source):
00032         "Parse an XML document from a system identifier or an InputSource."
00033         raise NotImplementedError("This method must be implemented!")

Here is the caller graph for this function:

def xml.sax.xmlreader.XMLReader.setContentHandler (   self,
  handler 
)

Reimplemented in xml.sax.expatreader.ExpatParser.

Definition at line 38 of file xmlreader.py.

00038 
00039     def setContentHandler(self, handler):
00040         "Registers a new object to receive document content events."
00041         self._cont_handler = handler

def xml.sax.xmlreader.XMLReader.setDTDHandler (   self,
  handler 
)

Definition at line 46 of file xmlreader.py.

00046 
00047     def setDTDHandler(self, handler):
00048         "Register an object to receive basic DTD-related events."
00049         self._dtd_handler = handler

def xml.sax.xmlreader.XMLReader.setEntityResolver (   self,
  resolver 
)

Definition at line 54 of file xmlreader.py.

00054 
00055     def setEntityResolver(self, resolver):
00056         "Register an object to resolve external entities."
00057         self._ent_handler = resolver

def xml.sax.xmlreader.XMLReader.setErrorHandler (   self,
  handler 
)

Definition at line 62 of file xmlreader.py.

00062 
00063     def setErrorHandler(self, handler):
00064         "Register an object to receive error-message events."
00065         self._err_handler = handler

def xml.sax.xmlreader.XMLReader.setFeature (   self,
  name,
  state 
)

Reimplemented in xml.sax.saxutils.XMLFilterBase, and xml.sax.expatreader.ExpatParser.

Definition at line 79 of file xmlreader.py.

00079 
00080     def setFeature(self, name, state):
00081         "Sets the state of a SAX2 feature."
00082         raise SAXNotRecognizedException("Feature '%s' not recognized" % name)

def xml.sax.xmlreader.XMLReader.setLocale (   self,
  locale 
)
Allow an application to set the locale for errors and warnings.

SAX parsers are not required to provide localization for errors
and warnings; if they cannot support the requested locale,
however, they must throw a SAX exception. Applications may
request a locale change in the middle of a parse.

Reimplemented in xml.sax.saxutils.XMLFilterBase.

Definition at line 66 of file xmlreader.py.

00066 
00067     def setLocale(self, locale):
00068         """Allow an application to set the locale for errors and warnings.
00069 
00070         SAX parsers are not required to provide localization for errors
00071         and warnings; if they cannot support the requested locale,
00072         however, they must throw a SAX exception. Applications may
00073         request a locale change in the middle of a parse."""
00074         raise SAXNotSupportedException("Locale support not implemented")

def xml.sax.xmlreader.XMLReader.setProperty (   self,
  name,
  value 
)

Reimplemented in xml.sax.saxutils.XMLFilterBase, and xml.sax.expatreader.ExpatParser.

Definition at line 87 of file xmlreader.py.

00087 
00088     def setProperty(self, name, value):
00089         "Sets the value of a SAX2 property."
00090         raise SAXNotRecognizedException("Property '%s' not recognized" % name)


Member Data Documentation

Definition at line 25 of file xmlreader.py.

Definition at line 26 of file xmlreader.py.

Definition at line 27 of file xmlreader.py.

Definition at line 28 of file xmlreader.py.


The documentation for this class was generated from the following file: