@XMLCREATE[filename] : Create an XML file for use by other XML variable functions.
If an XML file is already open it will be closed before the new file is created. If the file already exists, @XMLCREATE will return an error.
Returns 0 on success, or an XML error code on failure.
Example:
To create this XML named books.xml:
<book xmlns='urn:loc.gov:books' xmlns:isbn='urn:ISBN:0-395-36341-6'>
<title>Cheaper by the Dozen</title>
<isbn:number>1568491379</isbn:number>
</book>
Use the code:
echo %@xmlcreate[books.xml]
echo %@xmlstartelement[book,urn:loc.gov:books]
echo %@xmlputattr[xmlns:isbn,"",urn:ISBN:0-395-36341-6]
echo %@xmlputelement[title,urn:loc.gov:books,Cheaper by the Dozen]
echo %@xmlputelement[isbn:number,urn:ISBN:0-395-36341-6,1568491379);
echo %@xmlendelement[]
echo %@xmlclose[]
XML Errors:
101 Invalid attribute index
102 No attributes available
103 Invalid namespace index
104 No namespaces available
105 Invalid element index
106 No elements available
107 Attribute does not exist
201 Unbalanced element tag
202 Unknown element prefix (can't find namespace)
203 Unknown attribute prefix (can't find namespace)
204 Invalid XML markup
205 Invalid end state for parser
206 Document contains unbalanced elements
207 Invalid XPath
208 No such child
209 Top element does not match start of path
210 DOM tree unavailable
302 Can't open file
401 Invalid XML would be generated
402 An invalid XML name has been specified