I have two files.
One new file contains the other (old one )and has some additions.
I goal is two combine two files to one file that:
1.Preserves the old file structure.
2.Adds the new additions from the new one.
How complex is your XML? There are a number of perl XML parsers with different capabilities, some of which are easier to use than others. XML::Simple is a basic one.
Essentially, you need to read the 'old' file into a data structure, and read the 'additions' file into another structure. Then iterate through the additions, find where they belong, and add them to the original structure. Then write it out.
Steve
[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object:erlDesignPatterns)[/small]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.