Commands & Syntax > Commands > Xml Parser >

www.perfectkeyboard.com

 

File Create - < xml_file_create >() ... [Pro]

 

XML File Create
<xml_file_create>(File handle variable,Root element handle variable,"Password")
Available in: Professional edition

This command creates a new Xml file. A "xml file save" command must be used in order to persist the Xml file on disk (or other media).The command returns file handle and root element handle (to variables passed as parameters) needed for other operarions.

 

#

Parameter name

Parameter description

1

File handle variable

Xml file handle - a unique number that is used as parameter to other commands (for eaxample, to save or close the Xml file).

2

Root element handle variable

Xml root element handle - a unique number that identifies the root element of the Xml file. It is used as input to other commands (for example, to get set child elements).

3

Password

Password used to encrypt the data. The password is used to encrypt the data that are set in XML file using 'xml_element_create', 'xml_element_set', and 'xml_attribute_set' commands. Leave the parameter empty (default value) if no encryption is required.

 

Example (Macro Steps):

 

1

<#> <#>This macro shows how to create a new empty Xml file

2

Macro execution: ONLY COMMANDS

3

XML File Create vXmlDoc, Root element handle variable = vXmlRoot,Password =

4

XML File Save "vXmlDoc" (File path = "c:\temp\newFile.xml")

5

XML File Close "vXmlDoc"

Example (Plain Text):

 

<#>This macro shows how to create a new empty Xml file

<cmds>

<xml_file_create>(vXmlDoc,vXmlRoot)

<xml_file_save>(vXmlDoc,"c:\temp\newFile.xml")

<xml_file_close>(vXmlDoc)