CreateNewXMLDocument XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   CreateNewXMLDocument
(   XMLHandle :LONGINT;
    rootElementName :STRING
) :INTEGER ;

Python:

def  vs.CreateNewXMLDocument(XMLHandle, rootElementName):
   return INTEGER

Description:

Creates a new XML document.



  DeleteAttribute XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DeleteAttribute
(   XMLHandle :LONGINT;
    elementPath :STRING;
    attribute :STRING
) :INTEGER ;

Python:

def  vs.DeleteAttribute(XMLHandle, elementPath, attribute):
   return INTEGER

Description:

Deletes an attribute



  DeleteCDATA XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DeleteCDATA
(   XMLHandle :LONGINT;
    elementPath :STRING
) :INTEGER ;

Python:

def  vs.DeleteCDATA(XMLHandle, elementPath):
   return INTEGER

Description:

Deletes a CDATA section



  DeleteElement XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DeleteElement
(   XMLHandle :LONGINT;
    elementPath :STRING
) :INTEGER ;

Python:

def  vs.DeleteElement(XMLHandle, elementPath):
   return INTEGER

Description:

Deletes the element at the location specified by the path.



  FindAttribute XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   FindAttribute
(   XMLHandle :LONGINT;
    startElementPath :STRING;
    searchAttribute :STRING;
  VAR  foundPath :STRING;
  VAR  attributeValue :STRING
) :INTEGER ;

Python:

def  vs.FindAttribute(XMLHandle, startElementPath, searchAttribute):
   return (INTEGER, foundPath, attributeValue)

Description:

Finds the specified attribute by name.



  FindElement XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   FindElement
(   XMLHandle :LONGINT;
    startElementPath :STRING;
    searchElement :STRING;
  VAR  foundPath :STRING
) :INTEGER ;

Python:

def  vs.FindElement(XMLHandle, startElementPath, searchElement):
   return (INTEGER, foundPath)

Description:

Finds the specified element by name.



  GetAttributeValue XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   GetAttributeValue
(   XMLHandle :LONGINT;
    elementPath :STRING;
    attribute :STRING;
  VAR  value :STRING
) :INTEGER ;

Python:

def  vs.GetAttributeValue(XMLHandle, elementPath, attribute):
   return (INTEGER, value)

Description:

Gets a value of an attribute.



  GetCDATA XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   GetCDATA
(   XMLHandle :LONGINT;
    elementPath :STRING;
  VAR  returnVal :DYNARRAY[] of CHAR
) :INTEGER ;

Python:

def  vs.GetCDATA(XMLHandle, elementPath):
   return (INTEGER, returnVal)

Description:

Gets CDATA section.



  GetElementValue XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   GetElementValue
(   XMLHandle :LONGINT;
    elementPath :STRING;
  VAR  value :STRING
) :INTEGER ;

Python:

def  vs.GetElementValue(XMLHandle, elementPath):
   return (INTEGER, value)

Description:

Gets a value of an element, given a path.



  GetFirstChild XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   GetFirstChild
(   XMLHandle :LONGINT;
    elementPath :STRING;
  VAR  value :STRING
) :INTEGER ;

Python:

def  vs.GetFirstChild(XMLHandle, elementPath):
   return (INTEGER, value)

Description:

Returns first child of given element.



  GetNextElement XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   GetNextElement
(   XMLHandle :LONGINT;
    elementPath :STRING;
  VAR  value :STRING
) :INTEGER ;

Python:

def  vs.GetNextElement(XMLHandle, elementPath):
   return (INTEGER, value)

Description:

Returns the next element (sibling) of the given element.



  GetPreviousElement XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   GetPreviousElement
(   XMLHandle :LONGINT;
    elementPath :STRING;
  VAR  value :STRING
) :INTEGER ;

Python:

def  vs.GetPreviousElement(XMLHandle, elementPath):
   return (INTEGER, value)

Description:

Returns the previous element (sibling) of the given element.



  InitXML XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   InitXML
:LONGINT ;

Python:

def  vs.InitXML():
   return LONGINT

Description:

Initializes the XML System



  ReadXMLFile XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   ReadXMLFile
(   XMLHandle :LONGINT;
    whichPath :INTEGER;
    filename :STRING
) :INTEGER ;

Python:

def  vs.ReadXMLFile(XMLHandle, whichPath, filename):
   return INTEGER

Description:

Opens and reads an XML file.



  ReadXMLMemory XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   ReadXMLMemory
(   XMLHandle :LONGINT;
    XMLData :DYNARRAY[] of CHAR
) :INTEGER ;

Python:

def  vs.ReadXMLMemory(XMLHandle, XMLData):
   return INTEGER

Description:

Parses XML data in memory.



  ReleaseXML XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   ReleaseXML
( XMLHandle:LONGINT ) :INTEGER ;

Python:

def  vs.ReleaseXML(XMLHandle):
   return INTEGER

Description:

Releases XML parser internal memory.



  SetAttributeValue XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   SetAttributeValue
(   XMLHandle :LONGINT;
    elementPath :STRING;
    attribute :STRING;
    value :STRING
) :INTEGER ;

Python:

def  vs.SetAttributeValue(XMLHandle, elementPath, attribute, value):
   return INTEGER

Description:

Sets a value of an attribute.



  SetCDATA XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   SetCDATA
(   XMLHandle :LONGINT;
    elementPath :STRING;
    data :DYNARRAY[] of CHAR
) :INTEGER ;

Python:

def  vs.SetCDATA(XMLHandle, elementPath, data):
   return INTEGER

Description:

Sets CDATA section.



  SetElementValue XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   SetElementValue
(   XMLHandle :LONGINT;
    elementPath :STRING;
    value :STRING
) :INTEGER ;

Python:

def  vs.SetElementValue(XMLHandle, elementPath, value):
   return INTEGER

Description:

Sets a value of an element, given a path.



  WriteXMLFile XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   WriteXMLFile
(   XMLHandle :LONGINT;
    whichPath :INTEGER;
    filename :STRING
) :INTEGER ;

Python:

def  vs.WriteXMLFile(XMLHandle, whichPath, filename):
   return INTEGER

Description:

Writes an XML file.



  WriteXMLMemory XML 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   WriteXMLMemory
(   XMLHandle :LONGINT;
  VAR  XMLData :DYNARRAY[] of CHAR
) :INTEGER ;

Python:

def  vs.WriteXMLMemory(XMLHandle):
   return (INTEGER, XMLData)

Description:

Creates XML data from an internal DOM tree.