Package Bio :: Package Blast :: Module NCBIXML :: Class _XMLparser
[show private | hide private]
[frames | no frames]

Class _XMLparser

ContentHandler --+
                 |
                _XMLparser

Known Subclasses:
BlastParser

Generic SAX Parser

Just a very basic SAX parser.

Redefine the methods startElement, characters and endElement.
Method Summary
  __init__(self)
Constructor
  _secure_name(self, name)
Removes 'dangerous' from tag names
  characters(self, ch)
Found some text
  endElement(self, name)
Found XML end tag
  startElement(self, name, attr)
Found XML start tag
    Inherited from ContentHandler
  endDocument(self)
Receive notification of the end of a document.
  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.
  processingInstruction(self, target, data)
Receive notification of a processing instruction.
  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.
  startDocument(self)
Receive notification of the beginning of a document.
  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

__init__(self)
(Constructor)

Constructor
Overrides:
xml.sax.handler.ContentHandler.__init__

_secure_name(self, name)

Removes 'dangerous' from tag names

name -- name to be 'secured'

characters(self, ch)

Found some text

ch -- characters read
Overrides:
xml.sax.handler.ContentHandler.characters

endElement(self, name)

Found XML end tag

name -- tag name
Overrides:
xml.sax.handler.ContentHandler.endElement

startElement(self, name, attr)

Found XML start tag

No real need of attr, BLAST DTD doesn't use them

name -- name of the tag

attr -- tag attributes
Overrides:
xml.sax.handler.ContentHandler.startElement

Generated by Epydoc 2.1 on Wed Jan 31 09:58:01 2007 http://epydoc.sf.net