Package pyre :: Package xml :: Module Parser :: Class Parser
[show private | hide private]
[frames | no frames]

Class Parser

ContentHandler --+
                 |
                Parser

Known Subclasses:
Parser, Parser

Method Summary
  __init__(self)
  characters(self, content)
Receive notification of character data.
  endDocument(self)
Receive notification of the end of a document.
  endElement(self, name)
Signals the end of an element in non-namespace mode.
  parse(self, stream, document, parserFactory)
  processingInstruction(self, target, data)
Receive notification of a processing instruction.
  startDocument(self)
Receive notification of the beginning of a document.
  startElement(self, name, attributes)
    Inherited from ContentHandler
  endElementNS(self, name, qname)
Signals the end of an element in namespace mode.
  endPrefixMapping(self, prefix)
End the scope of a prefix-URI mapping.
  ignorableWhitespace(self, whitespace)
Receive notification of ignorable whitespace in element content.
  setDocumentLocator(self, locator)
Called by the parser to give the application a locator for locating the origin of document events.
  skippedEntity(self, name)
Receive notification of a skipped entity.
  startElementNS(self, name, qname, attrs)
Signals the start of an element in namespace mode.
  startPrefixMapping(self, prefix, uri)
Begin the scope of a prefix-URI Namespace mapping.

Method Details

characters(self, content)

Receive notification of character data.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.
Overrides:
xml.sax.handler.ContentHandler.characters (inherited documentation)

endDocument(self)

Receive notification of the end of a document.

The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.
Overrides:
xml.sax.handler.ContentHandler.endDocument (inherited documentation)

endElement(self, name)

Signals the end of an element in non-namespace mode.

The name parameter contains the name of the element type, just as with the startElement event.
Overrides:
xml.sax.handler.ContentHandler.endElement (inherited documentation)

processingInstruction(self, target, data)

Receive notification of a processing instruction.

The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.

A SAX parser should never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.
Overrides:
xml.sax.handler.ContentHandler.processingInstruction (inherited documentation)

startDocument(self)

Receive notification of the beginning of a document.

The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator).
Overrides:
xml.sax.handler.ContentHandler.startDocument (inherited documentation)

Generated by Epydoc 2.1 on Tue May 4 16:58:13 2004 http://epydoc.sf.net