XMLTools
ParseFile
read an XML document from a file
Calling Sequence
Parameters
Description
Examples
Compatibility
ParseFile(fileName, opts)
fileName
-
string; name of file to read
opts
equation(s) of the form option=value where option is one of validate, externaldtd, entities, prolog, or whitespace; specify parsing options
The ParseFile(fileName) command reads XML data from the file fileName.
The file is closed after it is read.
The opts argument can contain one or more equations that set parsing options.
The validate option determines whether a validating or a non-validating parser should be used. Possible values are true and false. By default validate is set to false.
The externaldtd option determines whether the parser will process any external document type definition (DTD) referenced in the file. Note this action typically requires network resources whose availability will therefore affect the parsing time. Possible values are true and false. By default externaldtd is set to true.
The entities option determines whether the parser should resolve entity references. Possible values are name and value. By default entities is set to name.
The prolog option determines whether prolog should be included in the document. Possible values are true and false. By default prolog is set to false.
The whitespace option indicates whether ignorable whitespace should be included in the document. Possible values are true and false. This option is effective only if validate is set to true. By default whitespace is set to true.
with⁡XMLTools:
file≔FileTools:-JoinPath⁡help,XMLTools,SimpleDocument3.xml,base=datadir
ParseFile⁡file
The XMLTools[ParseFile] command was updated in Maple 18.
The externaldtd option was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
See Also
XMLTools[ParseString]
XMLTools[ToString]
Download Help Document