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.
| Argument | Type | Required | Description |
|---|---|---|---|
dataObject | Yes | The data object to serialize |
extend
Method used to decorate a given object (publicAPI+model) with vtkXMLWriter characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IXMLWriterInitialValues | No | (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.
| Argument | Type | Required | Description |
|---|---|---|---|
parentEle | Yes | The parent XML element | |
scalars | vtkDataArray | Yes | The array to append |
processDataSetAttributes
Append the arrays of a vtkDataSetAttributes under the given element.
| Argument | Type | Required | Description |
|---|---|---|---|
parentEle | Yes | The parent XML element | |
dataSetAttributesName | Yes | Either 'PointData' or 'CellData' | |
dataSetAttributes | vtkDataSetAttributes | Yes | The attributes to append |
Returns
| Type | Description |
|---|---|
| The created XML element |
requestData
| Argument | Type | Required | Description |
|---|---|---|---|
inData | Yes | ||
outData | Yes |
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.
| Argument | Type | Required | Description |
|---|---|---|---|
object | Yes | The data object to serialize |