parse_document_xml
Parses an XML file, or a string of XML data, into documents and calls a function on each document.
Syntax
parse_document_xml( input, isFile, handler [, params ] )
Arguments
| Argument | Description | 
|---|---|
| input | (string) The path to the XML file, or a string of XML data. | 
| isFile | (boolean) Specifies whether the inputis a file path. | 
| handler | (document_handler_function) The function to call on each document that is parsed from the XML file. The function must accept a LuaDocument as the only argument. | 
| params | (table) A table of named parameters to configure parsing. The table maps parameter names (String) to parameter values. For information about the parameters that you can set, see the following table. | 
Named Parameters
| Named Parameter | Description | 
|---|---|
| content_paths | (string list, default DRECONTENT) The paths in the XML to the elements that contain document content. You can specify a list of paths. | 
| document_root_paths | (string list, default DOCUMENT) The paths in the XML to the elements that represent the root of a document. You can specify a list of paths. | 
| include_root_path | (boolean, default false) Specifies whether to include thedocument_root_pathsnode in the document metadata. The default value includes only children of the root node. | 
| reference_paths | (string list, default DREREFERENCE) The paths in the XML to elements that contain document references. Though you can specify a list of paths, there must be exactly one reference per document. | 
Returns
Nothing.