Package Martel :: Module Parser :: Class RecordParser
[show private | hide private]
[frames | no frames]

Class RecordParser

XMLReader --+
            |
           RecordParser


Parse the input data a record at a time
Method Summary
  __init__(self, format_name, attrs, record_tagtable, (want_groupref_names, debug_level, attrlookup), make_reader, reader_args)
parse the input data a record at a time...
  __str__(self)
  close(self)
  copy(self)
  parse(self, source)
parse using the URL or file handle
  parseFile(self, fileobj)
parse using the input file object
  parseString(self, s)
parse using the given string
    Inherited from XMLReader
  getContentHandler(self)
Returns the current ContentHandler.
  getDTDHandler(self)
Returns the current DTD handler.
  getEntityResolver(self)
Returns the current EntityResolver.
  getErrorHandler(self)
Returns the current ErrorHandler.
  getFeature(self, name)
Looks up and returns the state of a SAX2 feature.
  getProperty(self, name)
Looks up and returns the value of a SAX2 property.
  setContentHandler(self, handler)
Registers a new object to receive document content events.
  setDTDHandler(self, handler)
Register an object to receive basic DTD-related events.
  setEntityResolver(self, resolver)
Register an object to resolve external entities.
  setErrorHandler(self, handler)
Register an object to receive error-message events.
  setFeature(self, name, state)
Sets the state of a SAX2 feature.
  setLocale(self, locale)
Allow an application to set the locale for errors and warnings.
  setProperty(self, name, value)
Sets the value of a SAX2 property.

Method Details

__init__(self, format_name, attrs, record_tagtable, (want_groupref_names, debug_level, attrlookup), make_reader, reader_args=())
(Constructor)

parse the input data a record at a time

format_name - XML tag name for the whole data file
record_tagtable - mxTexTools tag table for each record
want_groupref_names - flag to say if the match_group table needs to
      be reset (will disappear with better support from mxTextTools)

make_reader - callable object which creates a RecordReader; first
      parameter will be an input file object
reader_args - optional arguments to pass to make_reader after the
      input file object
Overrides:
xml.sax.xmlreader.XMLReader.__init__

parse(self, source)

parse using the URL or file handle
Overrides:
xml.sax.xmlreader.XMLReader.parse

parseFile(self, fileobj)

parse using the input file object

XXX will be removed with the switch to Python 2.0, where parse() takes an 'InputSource'

parseString(self, s)

parse using the given string

XXX will be removed with the switch to Python 2.0, where parse() takes an 'InputSource'

Generated by Epydoc 2.1 on Thu Aug 10 20:05:51 2006 http://epydoc.sf.net