VS:XMLSAXBeginDocFile

From Vectorworks Developer
Revision as of 10:50, 12 August 2013 by Root (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

Description

Write XML using SAX, begin of a document file. MLSAXEndDoc ends a document.
FUNCTION XMLSAXBeginDocFile(
XMLHandle  :LONGINT;
whichPath  :INTEGER;
filename  :STRING) : INTEGER;
def vs.XMLSAXBeginDocFile(XMLHandle, whichPath, filename):
    return INTEGER

Parameters

XMLHandle LONGINT
whichPath INTEGER
filename STRING

Example

VectorScript

PROCEDURE XMLSaxTest_Write;
CONST
	kExternalsFolder 		= 2;
VAR
	hXML    : LONGINT;
	result  : INTEGER;
	xmlFile : STRING;
	xmlData	: DYNARRAY [] OF CHAR;

BEGIN
	hXML := InitXML;

	xmlFile := 'XML Test File OUTPUT.xml';
	result := XMLSAXBeginDocFile( hXML, kExternalsFolder, xmlFile );

	result := XMLSAXBeginNode( hXML, 'theRoot' );
		result := XMLSAXBeginNode( hXML, 'data' );
			result := XMLSAXAddNodeAttr( hXML, 'id', '1' );
			result := XMLSAXAddNodeAttr( hXML, 'name', 'none' );
			result := XMLSAXAddNodeValue( hXML, 'value1' );
		result := XMLSAXEndNode( hXML );

		result := XMLSAXBeginNode( hXML, 'data' );
			result := XMLSAXAddNodeValue( hXML, 'value2' );
		result := XMLSAXEndNode( hXML );

	result := XMLSAXEndNode( hXML );

	result := XMLSAXEndDoc( hXML );

	result := ReleaseXML(hXML);

	AlrtDialog( Concat( 'done! result=', result ) );
END;
RUN(XMLSaxTest_Write);

Python


Version

Availability: from Vectorworks 2011

See Also

VS:InitXML | VS:ReleaseXML

VS:XMLSAXEndDoc | VS:XMLSAXBeginNode | VS:XMLSAXEndNode | VS:XMLSAXAddNodeAttr | VS:XMLSAXAddNodeValue

[[VS:InitXML]] | [[VS:ReleaseXML]] [[VS:XMLSAXEndDoc]] | [[VS:XMLSAXBeginNode]] | [[VS:XMLSAXEndNode]] | [[VS:XMLSAXAddNodeAttr]] | [[VS:XMLSAXAddNodeValue]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox