XML - Begin editing file or string¶
This custom action lets you start manipulating XML data. It can read XML data from existing XML file or from a string.
All XML-related custom actions require an XML ID that is created with this custom action "Begin editing file or string": thus, it must be the first custom action executed when you want to edit XML.
| Property Name | Data Type | Description |
|---|---|---|
| XMLLoadWay | TXMLLoad | If set to xmlLoadFromFile, the XML file whose path is specified with Filename is opened (the file must exist). If set to xmlLoadFromString, the XML resource is loaded from the string directly entered in the Filename property. |
| Filename | String | Full path to the XML file that should be loaded, or a string that contains an entire XML document or a well-formed fragment (can use PB variables). |
| IDXML | TXMLID | A unique string identifier that will be associated to the opened XML resource. |
Examples¶
When using xmlLoadFromFile, the XML file must exist. Variables are accepted: %DESTPATH%\my file.xml
If you want to create an XML file from scratch, use xmlLoadFromString and provide the contents of the XML document in the Filename property. For instance:
<customer><first_name>Joe</first_name><last_name>Doe</last_name></customer>