pc:ReadXmlFile |
Attempts to parse the contents of a specified file as XML. If successful, returns that XML content as a node set, except if a variable is assigned as part of the directive, as in Example 2. Returns an XML fragment. If not successful, returns an error. See the "Errors" section.
Syntax
The required filepath points to the file to be read. If filepath is a relative filepath, the path is relative to the current working directory.
Example 1
Example 2
If the file's content is :
then Example 2 returns:
Example 3 This example reads a dialog description from a file and passes it to pc:Dialog which displays the dialog on the screen.
ErrorsIf the file does not contain valid XML, an <Error> element is returned such as the following: <Error>The '<this>' start tag on line 2 position 4 does not match the end tag of 'that'.</Error>
See also |