in reply to Re^2: Edit XML through XML Compile
in thread Edit XML through XML Compile
General questions get general answers... there is an example of reading an XML file with XML::Compile in this article: http://perl.overmeer.net/xml-compile/papers/201208-PerlMagazine-article-en.html
That gets you a Perl data structure which you can manipulate to add the items you need. If you're not sure how to go about that, then these should be helpful: perldsc, perlreftut, perlref
An example of writing that back out is here: http://blogs.perl.org/users/brian_e_lozier/2011/10/using-xmlcompile-to-output-xsd-compliant-xml.html (note XML::LibXML::Document's toFile method is probably helpful)
That gives you everything you need to do what you describe. For more specific answers, be more specific than "does not work out", for example provide a runnable sample program that reproduces the problem. I know what I mean. Why don't you?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Edit XML through XML Compile
by chenino (Acolyte) on Dec 22, 2014 at 15:10 UTC | |
by Anonymous Monk on Dec 22, 2014 at 20:03 UTC |