Section: Visualization Toolkit IO Classes
To create an instance of class vtkXMLDataParser, simply invoke its constructor as follows
obj = vtkXMLDataParser
obj
is an instance of the vtkXMLDataParser class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkXMLDataParser = obj.NewInstance ()
vtkXMLDataParser = obj.SafeDownCast (vtkObject o)
vtkXMLDataElement = obj.GetRootElement ()
- Get the root element from the XML document.
obj.SetCompressor (vtkDataCompressor )
- Get/Set the compressor used to decompress binary and appended data
after reading from the file.
vtkDataCompressor = obj.GetCompressor ()
- Get/Set the compressor used to decompress binary and appended data
after reading from the file.
long = obj.GetWordTypeSize (int wordType)
- Get the size of a word of the given type.
int = obj.Parse ()
- Parse the XML input and check that the file is safe to read.
Returns 1 for okay, 0 for error.
int = obj.GetAbort ()
- Get/Set flag to abort reading of data. This may be set by a
progress event observer.
obj.SetAbort (int )
- Get/Set flag to abort reading of data. This may be set by a
progress event observer.
float = obj.GetProgress ()
- Get/Set progress of reading data. This may be checked by a
progress event observer.
obj.SetProgress (float )
- Get/Set progress of reading data. This may be checked by a
progress event observer.
obj.SetAttributesEncoding (int )
- Get/Set the character encoding that will be used to set the attributes's
encoding type of each vtkXMLDataElement created by this parser (i.e.,
the data element attributes will use that encoding internally).
If set to VTK_ENCODING_NONE (default), the attribute encoding type will
not be changed and will default to the vtkXMLDataElement default encoding
type (see vtkXMLDataElement::AttributeEncoding).
int = obj.GetAttributesEncodingMinValue ()
- Get/Set the character encoding that will be used to set the attributes's
encoding type of each vtkXMLDataElement created by this parser (i.e.,
the data element attributes will use that encoding internally).
If set to VTK_ENCODING_NONE (default), the attribute encoding type will
not be changed and will default to the vtkXMLDataElement default encoding
type (see vtkXMLDataElement::AttributeEncoding).
int = obj.GetAttributesEncodingMaxValue ()
- Get/Set the character encoding that will be used to set the attributes's
encoding type of each vtkXMLDataElement created by this parser (i.e.,
the data element attributes will use that encoding internally).
If set to VTK_ENCODING_NONE (default), the attribute encoding type will
not be changed and will default to the vtkXMLDataElement default encoding
type (see vtkXMLDataElement::AttributeEncoding).
int = obj.GetAttributesEncoding ()
- Get/Set the character encoding that will be used to set the attributes's
encoding type of each vtkXMLDataElement created by this parser (i.e.,
the data element attributes will use that encoding internally).
If set to VTK_ENCODING_NONE (default), the attribute encoding type will
not be changed and will default to the vtkXMLDataElement default encoding
type (see vtkXMLDataElement::AttributeEncoding).
obj.CharacterDataHandler (string data, int length)
- If you need the text inside XMLElements, turn IgnoreCharacterData off.
This method will then be called when the file is parsed, and the text
will be stored in each XMLDataElement. VTK XML Readers store the
information elsewhere, so the default is to ignore it.