DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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?



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links