UseXMLExtract
Use this form set level rule when the extract list loaded by the transaction is also the source of the XML tree.
Note
The extract list and the XML tree are separate items. Even if you are only using an XML file as the source of the transaction, there will be two copies of the information in memory — one as the extract list and one as the XML tree.
If you are running Documaker from IDS, use the ImportXMLExtract rule to bring in XML in standard Documaker XML format, such as from Documaker Desktop or iDocumaker. Use the UseXMLExtract rule to convert a loaded extract file into an XML tree, which you can then use to query data.
Syntax
Each XML transaction must begin with the XML declaration. The system assumes each transaction is a separate entity and requires that each transaction begin with an XML declaration.
Keep in mind that you will not be able to load this appended file as one large XML file. The system does not load the entire file before it processes the first transaction. Instead, it loads one transaction and then processes that transaction. Make sure there are line feeds between transactions. The line feed requirement is not an XML issue, but rather tells the system where one transaction ends and the next begins.
You place the rule in different locations in the AFGJOB.JDT file, depending on the mode in which you are running. For multi-step mode, place the XMLFileExtract rule after the LoadExtractData rule, as shown here:
;LoadExtractData;;
;UseXMLExtract;;;
For single or two-step mode, place the XMLFileExtract rule after the NoGenTrnTransactionProc rule, as shown here:
;NoGenTrnTransactionProc;;
;UseXMLExtract;;;
Remember that the system decides whether to search the extract list or the XML tree by checking to see if the search mask starts with an exclamation mark (!). The exclamation mark indicates that this is an XML path string. The system ignores the exclamation mark when it performs the XML path search.
To preserve the space when mapping data, use two exclamation marks (!!). Otherwise, the system assumes it should remove the leading white space.
Use these INI options with this rule:
- In the TRN_File control group, set the MaxExRecLen option to the optimal read size for your system. If you set this too large, it will consume too many resources. If you set it too small, it will perform too many reads. Check with your system administrator for guidance on setting this option.
< TRN_File >
MaxExRecLen =
- In the Data control group, make sure the ExtrFile option points to the location of your XML file. Here is an example:
< Data >
ExtrFile = .\extract\Sample.xml
< ExtractKeyField >
SearchMask = 1,<?xml
< RunMode >
XMLExtract = Yes
- When running NoGenTrnTransactionProc (single or two-step mode) and the INI option is set to load the XML file, so there is no need to place XMLFileExtract rule in the AFGJOB.JDT file. Doing so makes the system load the XML file twice.
© Copyright 2020, Oracle and/or its affiliates. All rights reserved. Legal notices.