masterDocRegexp=(.*).xml subDocRegexp=(.*).pdf
masterDocRegexp=INVOICE_(.*).xml subDocRegexp=ATTACHMENT_(.*)[_\d]?.pdf subDocPresentationRegexp=IMAGE_(.*).pdf
<fpclient> <log mode="FILE" path="c:/ Temp/ log/ filsplitter.log"> <filename pattern="MERFL.*xml"> <defaultEncoding charset="ISO-8859-15"> <path verbose="false"> <incomming path="c:/ Temp/ incoming"/> <outgoing path="c:/ Temp/ outgoing"/> <temporary path="c:/ Temp/ temp"/> <backup path="c:Temp/ backup"/> </path> <xmltag verbose="false"> <removeTag pattern="^S[O-P].*"/> <splitTag pattern="Finvoice"/> <attachmentTag pattern="InvoiceFreeText" group="(.*)" filename="${1}"/> <savedBatchDataTag pattern="sectionInfo" appendAfterSplit="</ section></ batch>"/> <CSVTag header="TRUE" csvIdentifier="14" useCSVIndex="TRUE" invoiceIdentifier="/ Finvoice/ InvoiceDetails/ AgreementIdentifier"/> <modTag xpath="/ Finvoice/ BuyerPartyDetails/ BuyerOrganisationName" action="BEFORE" value="A"/> <modTag xpath="/ Finvoice/ BuyerPartyDetails/ BuyerOrganisationName" action="AFTER" value="B"/> <modTag xpath="/ Finvoice/ BuyerPartyDetails/ BuyerOrganisationTaxCode" action="REPLACE" value="C"/> <modTag xpath="/ Finvoice/ BuyerPartyDetails/ buyerExtra" action="CREATE" value="D"/> <modTag xpath="/ Finvoice/ MessageTransmissionDetails/ MessageSenderDetails/ FromIntermediator" action="BEFORE" value="1" useCSV="TRUE" useCSVIndex="TRUE"/> <modTag xpath="/ Finvoice/ MessageTransmissionDetails/ MessageSenderDetails/ FromIntermediator" action="AFTER" value="InvoiceNumber" useCSV="TRUE" useCSVIndex="FALSE"/> <modTag xpath="/ Finvoice/ MessageTransmissionDetails/ MessageSenderDetails/ FromIntermediator[2]" action="REPLACE" value="3" useCSV="TRUE" useCSVIndex="TRUE"/> </xmltag> </fpclient>
TAG | ATTRIBUTE | VALUE |
Log | Mode | FILE for writing to file and SYSTEM to write to eventlog on Windows and syslog for a linux machine. |
Log | Path | Where logfile will be saved, path must exist but not the file. |
filename | Pattern | Regexp, Scan invoices file matching this pattern |
path | Vervbose | false for information and true for extended information |
incomming | Path | where original unspitted/unprocessed invoices and attachments are stored. |
defaultEncoding | charset | Valid charset name. E.g ISO-8859-15 or UTF-8. This will be used as default encoding if FileSplitter fail to detect encoding from invoice or batch. |
outgoing | Path | where to store spitted/processed invoices and attachments files. |
temporary | Path | Working folder. |
backup | Path | Path where to move original files from incomming. All processed files from incomming will be moved to this path when successful processed. |
xmltag | verbose | false for information and true for extended information. |
removeTag | pattern | Regexp, start and end of expression shoud be removed. |
splitTag | pattern | Start and end tag that identifies a invoice in batch. |
attachmentTag | pattern | To match attachments filename to an invoice you need to configure attachmentTag with attribute pattern, group and filename. Pattern is a regular expression. Set pattern to a xmltag, then we will use group and filename to parse out that textvalue. |
attachmentTag | groups | Create groups with regular expression. These groups will be used in attribute filename. l.e. ([a-z0-9A-Z-]*)\ ([a-z0-9A-Z-]*) will create 2 groups. |
attachmentTag | filename | Here we create the filenames you will match to your invoice. l.e. Test{1]_{2].pdf will use group 1 and group 2 that are specified in attribute groups. |
CSVTag | header | true if CSV file have a header otherwise false |
CSVTag | csvIdentifier | index of csv value (starts with 0) or header name for value in CSV |
CSVTag | useCSVIndex | true if csvIdentifier use index otherwise false. |
CSVTag | csvFilenameIdentifier | True if we want to match value in invoice with filename of CSV, otherwise FALSE. |
CSVTag | invoiceIdentifier | XPath to identify value in XML file. |
CSVTag | invoiceIdentifierGroups | Create groups with regular expression. l.e. [a-z0-9A-Z-]*\ ([a-z0-9A-Z-]*). Will get one group in textvalue. |
CSVTag | invoiceIdentifierFilename | Parsed text to use for finding CSV as filename or use value inside CSV file. l.e. ${1}.csv will use group 1 and replace ${1} with that value. |
modTag | Xpath | XPath to find in XML file that will be enriched. |
modTag | Action | Can be one of following values BEFORE - Add value infront of textvalue. AFTER - Add value after textvalue. REPLACE - Replace all textvalue with new value, if xpath does not exist a new tag will be created. CREATE - Create new xml tag that is the valid xpath with values. |
modTag | Value | New text to use when enrich XML file. If no useCSVIndex and useCSV is used then this static text will used to replace value in XML. |
modTag | useCSVIndex | true to use index, false to use header name. |
modTag | useCSV | true when using CSV file for enrichment otherwize false. |
saveBatchDataTag | Pattern | RegExp, to detect last node in batch before every single invoice. |
SaveBatchDataTag | AppendAfterSplit | Node or nodes that must be appended at end of every splitted invoice. This string must exist in the original batch. Also notice that you can't write xml tags within configuration file. So instead using character <or> you MUST enter < or > so </INVOICES<>/CONTENT_FRAME></INOICE_CENTER> should be entered as </INVOICES></CONTENT_FRAME>/INVOICE_CENTER> |
Here we will try to find xpath /Finvoice/BuyerPartyDetails/BuyerOrganisationName and add value A before and B after existing value. We also try to find xpath /Finvoice/BuyerPartyDetails/BuyerOrganisationTaxCode and replace existing value with C. The last line will create a new tag if xpath is valid and set value D.<modtag xpath="/ Finvoice/ BuyerPartyDetails/ ByerOrganisationName" action="BEFORE" value="A"/> <modTag xpath="/ Finvoice/ BuyerPartyDetails/ BuyerOrganisationName" action="AFTER" value="B"/> <modTag xpath="/ Finvoice/ BuyerPartyDetails/ BuyerOrganisationTaxCode" action="REPLACE" value="C"/> <modTag xpath="/ Finvoice/ BuyerPartyDetails/ buyerExtra" action="CREATE" value="D"/>
Here we will connect CSV file with help of index 14 and xpath /Finvoice/InvoiceDetails/AgreementIdentifier. If they have same value they are connected and csv will be used to enrich invoice. First modTag will append value in CSV that have header invoiceNumber second modtag will replace value in /Finvoice/MessageTransmissionDetails/MessageSenderDetails/FromIntermediator [2] with value in index 3 in CSV file.<CSVTag header="TRUE" csvIdentifier="14" useCSVIndex="TRUE" invoiceIdentifier="/ Finvoice/ InvoiceDetails/ AgreementIdentifier"/> <modTag xpath="/ Finvoice/ MessageTransmissionDetails/ MessageSenderDetails/ FromIntermediator" action="AFTER" value="InvoiceNumber" useCSV="TRUE" useCSVIndex="FALSE"/> <modTag xpath="/ Finvoice/ MessageTransmissionDetails/ MessageSenderDetails/ FromIntermediator[2]" action="REPLACE" value="3" use CSV="TRUE" useCSVIndex="TRUE"/>
<CSVTag header="TRUE" csvFilenameIdentifier="TRUE" invoiceIdentifierGroups="[a-z0-9A-Z-]*\ ([a-z0-9A-Z-]*)." invoiceIdentifierFilename="${1}.csv" invoiceIdentifier="/ Finvoice/ InvoiceDetails[1]/ InvoiceFreeText[1]"/ >
<fpclient <log mode="FILE" path="/ tmp/ fileSplitter/ log/ startconf.log"/> <filename pattern="teappsInvoice.*xml"/> <defaultEncoding charset="ISO-8859-15"/> <path verbose="false"> <incomming path="/ tmp/ fileSplitter/ incoming"/> <outgoing path="/ tmp/ fileSplitter/ outgoing"/> <temporary path="/ tmp/ fileSplitter/ temp"/> <backup path="/ tmp/ fileSplitter/ backup"/> </path> <xmltag verbose="false"> <removeTag pattern="^S[OP].*"/> <splitTag pattern="^INVOICE$"/> <!--BGC-Invoice save batchdata when split → <saveBatchDataTag pattern="^INVOICES$" appendAfterSplit="<;/ INVOICES>;<;/ CONTENT_FRAME>;<;/ INVOICE_CENTER>;"/> </xmltag> </fpclient>
<fpclient> <log mode="FILE" path="/ tmp/ fileSplitter/ log/ startconf.log"/> <filename pattern="BGCInvoice.*xml"/> <defaultEncoding charset="ISO-8859-15"/> <path verbose="false"> <incomming path="/ tmp/ fileSplitter/ incoming"/> <outgoing path="/ tmp/ fileSplitter/ outgoing"/> <temporary path="/ tmp/ fileSplitter/ temp"/> <backup path="/ tmp/ fileSplitter/ backup"/> </path> <xmltag verbose="false"> <removeTag pattern="^S[OP].*"/> <splitTag pattern="^document$"/> <!--BGC-Invoice save batchdata when split → <saveBatchDataTag pattern="sectionInfo" appendAfterSplit="<;/ section>;<;/ batch>;"/> </xmltag> </fpclient>