Merging 2 XML files


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Merging 2 XML files

  1. #1
    Marcus Guest

    Merging 2 XML files


    Is it possible two merge 2 files with identical id tags in. However they are
    children of different parent tags that are also at different depths. I can
    merge two documents that have identical treesm but can i do it with unidentical
    trees?

  2. #2
    Rohit Wason Guest

    Re: Merging 2 XML files


    Marcus,

    When it comes to "merging" or "comparing" XML documents/strings, its a bit
    more tricky than it may seem.

    I feel that in these scenarios if you:

    1) lay down your merging and comparision rules
    2) make a utility that does follow your *rules*, accepts two xml-documents
    and merges them into a third resultant document.

    ...you are done.

    But such *rules* need a considerable time (and in the order of the size and
    complexity of the xml documents we are talking about). also, I amnot aware
    of any ready-made utility that does this for you : to define the rules etc.

    I suggest you can have a look at the xml documents you have in hand, identigy
    their key sections (like <Employee> tag or "DateOfBirth" attributes etc.)
    and try to make an entry in a table per such rule.

    you may then make a utility in any simple language like VB to use dom to
    then apply these rules to the xml-strings and "merge" them...

    all the best,

    Cheers
    Rohit



    "Marcus" <mglynn@filenet.com> wrote:
    >
    >Is it possible two merge 2 files with identical id tags in. However they

    are
    >children of different parent tags that are also at different depths. I can
    >merge two documents that have identical treesm but can i do it with unidentical
    >trees?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center