Package gavo :: Package votable :: Module votparse
[frames] | no frames]

Module votparse

source code

Stream parsing of VOTables.

This module builds on a shallow wrapping of expat in utils.iterparse. There is an "almost-tight" parsing loop in the parse method. It builds an xmlstan tree (mainly through the _processNodeDefault method).

Classes
  IGNORE
this is a sentinel element used when an element is not known but robust parsing is requested.
Functions
 
parse(inFile, watchset=[], raiseOnInvalid=True)
returns an iterator yielding items of interest.
source code
 
readRaw(inFile)
returns a V.VOTABLE instance with filled-in data for the input from inFile.
source code
 
parseString(string, watchset=[], raiseOnInvalid=True)
returns an iterator yielding pairs of (table definition, row iterator).
source code
Variables
  DEFAULT_WATCHSET = []
  VOTABLE_NAMESPACES = ['http://www.ivoa.net/xml/VOTable/v1.0', ...
  computeEndProcessors = <gavo.utils.codetricks.CachedGetter obj...
  computeElements = <gavo.utils.codetricks.CachedGetter object>
  __package__ = 'gavo.votable'
Function Details

parse(inFile, watchset=[], raiseOnInvalid=True)

source code 

returns an iterator yielding items of interest.

inFile is a something that supports read(bytes)

watchset is a sequence of items of VOTable you want yielded. By default, that's just VOTable.TABLE. You may want to see INFO or PARAM of certain protocols.

parseString(string, watchset=[], raiseOnInvalid=True)

source code 

returns an iterator yielding pairs of (table definition, row iterator).

string contains a VOTable literal.


Variables Details

VOTABLE_NAMESPACES

Value:
['http://www.ivoa.net/xml/VOTable/v1.0',
 'http://www.ivoa.net/xml/VOTable/v1.1',
 'http://www.ivoa.net/xml/VOTable/v1.2',
 'http://www.ivoa.net/xml/VOTable/v1.3']

computeEndProcessors

Value:
<gavo.utils.codetricks.CachedGetter object>