MivotBlock#

class astropy.io.votable.tree.MivotBlock(content=None)[source]#

Bases: Element

MIVOT Block holder: Processing VO model views on data is out of the scope of Astropy. This is why the only VOmodel-related feature implemented here the extraction or the writing of a mapping block from/to a VOTable There is no syntax validation other than the allowed tag names. The mapping block is handled as a correctly indented XML string which is meant to be parsed by the calling API (e.g., PyVO).

The constructor takes “content” as a parameter, it is the string serialization of the MIVOT block. If it is None, the instance is meant to be set by the Resource parser. Orherwise, the parameter value is parsed to make sure it matches the MIVOT XML structure.

Attributes Summary

content

The XML mapping block serialized as string.

Methods Summary

check_content_format()

Check if the content is on xml format by building a VOTable, putting a MIVOT block in the first resource and trying to parse the VOTable.

parse(votable, iterator, config)

Regular parser similar to others VOTable components.

to_xml(w)

Tells the writer to insert the MIVOT block in its output stream.

Attributes Documentation

content#

The XML mapping block serialized as string. If there is not mapping block, an empty block is returned in order to prevent client code to deal with None blocks.

Methods Documentation

check_content_format()[source]#

Check if the content is on xml format by building a VOTable, putting a MIVOT block in the first resource and trying to parse the VOTable.

parse(votable, iterator, config)[source]#

Regular parser similar to others VOTable components.

to_xml(w)[source]#

Tells the writer to insert the MIVOT block in its output stream.