Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: xml_merge

by morfeas (Novice)
on Feb 11, 2005 at 10:40 UTC ( #430042=note: print w/replies, xml ) Need Help??

in reply to xml_merge

Very helpfull indeed. But while testing it, if the splitting produce f00-100.xml and above, the meging is not applyed... in the resulting xml: <?merge subdocs = 0 :foo-01.xml?> <?merge subdocs = 0 :foo-02.xml?> <?merge subdocs = 0 :foo-03.xml?> and so one... Am i missing something or there is a problem on the index handling? P.S. like it alot!

Replies are listed 'Best First'.
Re^2: xml_merge
by mirod (Canon) on Feb 11, 2005 at 11:05 UTC

    It seems to work fine here (how often have you heard this? ;--): xml_split produces foo-00.xml, foo-01.xml to foo-99.xml, then foo-100.xml and above. And then xml_merge rebuilds the original file.

    Do you have a test case?

      Very often, yes. Well i have to mention that the splitting is used fot a particular section name ( -c SectionName foo.xml). Becuase my twig is v.3.14 i changed the inherited_att to inherit_att (line 102 in to conform with the XML::Twing::Elt. Worked fine in small xmls. In a big one had the prob. i took a different section (to reduce the splitted xmls) and then split again in th foo-01 to do foo-01-00 and so on. Merged the foo-01-00 but again had the same lines (fewer this time). Also merge does not reqs the -o flag so, i put the > result.xml. thnks
        my twig is v.3.14

        That's the explanation. You NEED 3.16. First the split on a given level (-l option, or default) will not work, and then merging back will not work because of the way processing instructions were handled (NOT!) when parsing with the twig_roots and twig_print_outside_roots options.

        I am afraid you will have to upgrade ;--)

        3.16 is tested with perl 5.8.5/expat 1.95.7/XML::Parser 2.34/whatever else is useful on linux, perl 5.8.6/expat 1.95.8/ recent version of other modules on Mac OS 10.3, more tests are on the way.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://430042]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2017-11-24 06:31 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (345 votes). Check out past polls.