Origin C's COM support can be used to programmatically create XML documents. To see what the code might look like, take a look at the WksToXML.PDF.
The functions in the program use the Microsoft MSXML parser (version 3 - other versions can be used) to convert an Origin worksheet into an XML document in the function called WksToXML. The function takes two arguments:
Once the C file has been compiled in Code Builder (Origin's Integrated Development Environment), the WKSToXML function can be called using either Origin C or LabTalk syntax. The call would similar to the following:
Another function in this file, XMLToWks, allows you to import an XML document into an Origin worksheet. The function takes one argument, the path and filename, as a string. A proper function call using this function would be as follows:
Note: This example is also available in the \Samples\COM Server and Client\XML\Client subfolder in Origin. It is called WksToXML.c.