more useful options | |
PerlMonks |
Multiple XML files from Directory to One XML file using perl.by jyo (Initiate) |
on Nov 18, 2011 at 14:06 UTC ( [id://938833]=perlquestion: print w/replies, xml ) | Need Help?? |
jyo has asked for the wisdom of the Perl Monks concerning the following question: Hi monks, This Is my first Experience using perl language,I have Multiple xml files in a folder, I need to create multiple XML files into one XML file.example code like this
Each xml file have same root and nodes with different data(name, address are different).I need to combine multile XML file into one XML file, my output look like this.
I Find the all xml file from directory using File::find But How can I Add all XML files data into one xml file without repeating same data. Its looking easy for You but I am very new to perl,help me with this problem. This is my first post, if any mistakes please excuse me. For the above question I tried like this Hi, I tried like this by using XML::LibXML::Reader
but I have two problem in this script 1) I am extracting information from all XML files Having "shiporder" Node element, But in one XML file I have data with some other Node element "definition" I am not extracting that information, What should I do if I want to extract that information and store in the same variable. 2) After extracting all information That is stored in a $INFO varible, I want to store that $INFO variable information in one xml file how can I do that one. Please help me. Thanks in advance jyo
Back to
Seekers of Perl Wisdom
|
|