Skip to content

XMLWriter ​

Methods ​

compressBlock ​

Deflate a block of bytes with zlib.

create ​

Build the XML document for the given data object and return its root element.

ArgumentTypeRequiredDescription
dataObjectYesThe data object to serialize

extend ​

Method used to decorate a given object (publicAPI+model) with vtkXMLWriter characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIXMLWriterInitialValuesNo(default: {})

getBlockSize ​

Get the block size used when compressing binary payloads.

getFile ​

Get the string produced by the last requestData call. Undefined before the first one, since file has no default.

getFormat ​

Get the encoding used for the data arrays.

processDataArray ​

Encode a data array's values per the given format.

processDataArray ​

Append a single data array under the given element.

ArgumentTypeRequiredDescription
parentEleYesThe parent XML element
scalarsvtkDataArrayYesThe array to append

processDataSetAttributes ​

Append the arrays of a vtkDataSetAttributes under the given element.

ArgumentTypeRequiredDescription
parentEleYesThe parent XML element
dataSetAttributesNameYesEither 'PointData' or 'CellData'
dataSetAttributesvtkDataSetAttributesYesThe attributes to append

Returns ​

TypeDescription
The created XML element

requestData ​

ArgumentTypeRequiredDescription
inDataYes
outDataYes

setBlockSize ​

Set the block size used when compressing binary payloads.

setFormat ​

Set the encoding used for the data arrays.

write ​

Serialize the given data object to an XML string.

ArgumentTypeRequiredDescription
objectYesThe data object to serialize