VS:SetCDATA

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Sets the CDATA section of the specified element. The parameter elementPath is specified as a path of element names.
FUNCTION SetCDATA(
XMLHandle  :LONGINT;
elementPath  :STRING;
data  :DYNARRAY [] OF CHAR) :INTEGER;
def vs.SetCDATA(XMLHandle, elementPath, data):
    return INTEGER

Parameters

XMLHandle LONGINT
elementPath STRING
data DYNARRAY [] OF CHAR

Example

VectorScript

PROCEDURE test;
VAR 	xml : LONGINT;
	err : INTEGER;
	mem : DYNARRAY OF CHAR;
	value : STRING;

BEGIN
	mem := '';

	xml := InitXML;	

	err := CreateNewXMLDocument( xml, 'root' );

	err := SetElementValue( xml, '/root/value', '34' );
	err := SetCDATA( xml, '/root/data', 'custom data' );

	err := WriteXMLMemory( xml, mem );

	AlrtDialog( mem );

	err := ReleaseXML( xml );
END;
RUN(test);

Python


Version

Availability: from All Versions

This is drop-in function.

See Also

VS:GetCDATA
[[VS:GetCDATA]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox