Package dataprocessor :: Package sax :: Module saxjcml2orange :: Class SaxJcmlOrangeHeader
[hide private]
[frames] | no frames]

Class SaxJcmlOrangeHeader

source code

xml.sax.handler.ContentHandler --+
                                 |
                                SaxJcmlOrangeHeader

Instance Methods [hide private]
 
__init__(self, o_file, class_name, desired_attributes, meta_attributes, discrete_attributes, get_nested_attributes, class_type, hidden_attributes=[], class_discretize=False) source code
 
startElement(self, name, attrs)
Signals the start of an element (simplesentence or parallelsentence)
source code
 
characters(self, ch)
The Parser will call this method to report each chunk of character data.
source code
 
endElement(self, name)
Signals the end of an element in non-namespace mode.
source code
 
endDocument(self)
Receive notification of the end of a document.
source code

Inherited from xml.sax.handler.ContentHandler: endElementNS, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElementNS, startPrefixMapping

Method Details [hide private]

__init__(self, o_file, class_name, desired_attributes, meta_attributes, discrete_attributes, get_nested_attributes, class_type, hidden_attributes=[], class_discretize=False)
(Constructor)

source code 
Parameters:
  • oFile (file object) - file object to receive processed changes
  • attributeNames (list of strings) - a list of all attribute names
Overrides: xml.sax.handler.ContentHandler.__init__

startElement(self, name, attrs)

source code 

Signals the start of an element (simplesentence or parallelsentence)

Parameters:
  • name (string) - the name of the element
  • attrs (attributes) - of the element type as a string and the attrs parameter holds an object of the Attributes interface containing the attributes of the element.
Overrides: xml.sax.handler.ContentHandler.startElement

characters(self, ch)

source code 

The Parser will call this method to report each chunk of character data. We use it to store the string of the simplesentence

Parameters:
  • ch (str) - character being parsed
Overrides: xml.sax.handler.ContentHandler.characters

endElement(self, name)

source code 

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)

endDocument(self)

source code 

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)