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

Class RecordParser

source code

xml.sax.xmlreader.XMLReader --+
                              |
                             RecordParser

Parse the input data a record at a time

Instance Methods [hide private]
 
__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
source code
 
copy(self) source code
 
__str__(self) source code
 
parseFile(self, fileobj)
parse using the input file object
source code
 
parse(self, source)
parse using the URL or file handle
source code
 
parseString(self, s)
parse using the given string
source code
 
close(self) source code

Inherited from xml.sax.xmlreader.XMLReader: getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setLocale, setProperty

Method Details [hide private]

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

source code 
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__

parseFile(self, fileobj)

source code 

parse using the input file object

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

parse(self, source)

source code 

parse using the URL or file handle

Overrides: xml.sax.xmlreader.XMLReader.parse

parseString(self, s)

source code 

parse using the given string

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