Herkum has asked for the wisdom of the Perl Monks concerning the following question:
I have XML documents that are large XML documents and I want to break them up into multiple documents.
# Start <root> <a> <b>Test</b> </a> <aa> <b>Test</b> </aa> </root>
# New Document <root> <a> <b>Test</b> </a> </root> <root> <aa> <b>Test</b> </aa> </root>
I figured I could use twig_handlers, except for one problem. I don't know the exact name of the elements that will be below the root of the document. If I had the names it would be easy, but I am not sure exactly how to approach this.
I could just get all the children under the root, but I want to avoid having to process the whole document for performance reasons. Does anyone have any suggestions or am I missing something obvious?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::Twig Stream root children
by toolic (Bishop) on Oct 02, 2009 at 20:24 UTC | |
by Herkum (Parson) on Oct 02, 2009 at 20:28 UTC | |
by Anonymous Monk on Oct 03, 2009 at 01:47 UTC | |
by mirod (Canon) on Oct 03, 2009 at 16:08 UTC | |
by Herkum (Parson) on Oct 05, 2009 at 14:59 UTC | |
by mirod (Canon) on Oct 04, 2009 at 09:51 UTC | |
by Anonymous Monk on Oct 04, 2009 at 10:51 UTC | |
by mirod (Canon) on Oct 04, 2009 at 20:16 UTC | |
by Herkum (Parson) on Oct 04, 2009 at 14:02 UTC | |
|
Re: XML::Twig Stream root children
by Skeeve (Parson) on Oct 03, 2009 at 15:46 UTC |