Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: To XML Diff betweet two steams

  1. #1
    Join Date
    Feb 2011

    Default To XML Diff betweet two steams

    Hi All,
    My requirement is to compare two XML stream(read from XML file - both will be dynamic XML's). One stream I am reading a file(Stored in Flat File) which will be as "<Datas><a>sss</a><b>222</b><c>hi</c></Datas>" and other one also reading another XML file is also same format as "<Datas><a>sss</a><b>2227</b></Datas>". Want to get the difference as below.

    Tag Name Diff. Result Value
    a same sss
    b no same 2227
    c new hi
    Thanks in advance
    Last edited by kanags; 08-16-2012 at 10:40 AM. Reason: To Allign for better view

  2. #2
    Join Date
    Jun 2012


    If you want to compare XML documents using graphical programming only, certain structural requirements must be met: Documents must be flat representations (FLAT XML) of rows and fields, no attributes and no sub-elements, and there must be a defined order on the field elements. In this special case you can have what you want, using SAX parsing and a Diff step.
    Attached Files Attached Files
    Last edited by marabu; 08-18-2012 at 04:33 AM.
    So long, and thanks for all the fish.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.