Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

compare 2 xml file in background

former_member445510
Active Participant
0 Likes
614

Hello,

I want to compare two XML files in background containing data like following:

<ReportingDocument>

        <CompanyCode>1000</CompanyCode>

        <TransactionDate>2000-01-05</TransactionDate>

        <InvoiceProperties>

            <SupplierInvoiceNumber>000000162000VSTX</SupplierInvoiceNumber>

            <InvoiceNumber>0100000000</InvoiceNumber>

         </InvoiceProperties>

</ReportingDocument>

As result, i have to receive automatically Email in my outlook inbox like something:

Test is ok.

OR

Test is not ok, differences in invoiceNumber,.....

can some one help me ?

Regards,

Ouail.

Hello,

I want to compare two XML files in background containing data like following:

<ReportingDocument>

        <CompanyCode>1000</CompanyCode>

        <TransactionDate>2000-01-05</TransactionDate>

        <InvoiceProperties>

            <SupplierInvoiceNumber>000000162000VSTX</SupplierInvoiceNumber>

            <InvoiceNumber>0100000000</InvoiceNumber>

         </InvoiceProperties>

</ReportingDocument>

As result, i have to receive automatically Email in my outlook inbox like something:

Test is ok.

OR

Test is not ok, differences in invoiceNumber,.....

can some one help me ?

Regards,

Ouail.

1 REPLY 1
Read only

arthur_alvesteixeira
Active Participant
0 Likes
459

Ouail,

1) Read XML file using open dataset (because it's in background)

2) Download files to program memory

3) Get the invoice number (example, next 10 chars after <InvoiceNumber>... or between <InvoiceNumber> and </InvoiceNumber> from these 2 files

4) Check if invoice number isn't char (in case that when initial the next characters are the closing tag).

5) Compare both invoice values from xml files

6) Build the text email with the compare detail. "...test is not ok... / .... Teste is ok...."