I have several dynamically generated XML files in a directory, and I like to take certain fields and values from it and build a index.xml file.
I can combine the files into a single string, strip some headers and get the value what I want. I am looking for cleaner apporach. I discussed this in CB for a while. Either Perl based or XSLT based solution would be good.
Thanks,
Update: Here is the example: There are multiple files in given directory.
#File1.xml
<root>
<person>
<name>John</name>
<age>23</age>
<city>New York</city>
</person>
<person>
<name>Marry/name>
<age>22</age>
<city>London</city>
</person>
</root>
#File2.xml
<root>
<person>
<name>Joe </name>
<age>25</age>
<city>Huston</city>
</person>
</root>
#index.xml
<friends>
<person>
<name>John</name>
<age>23<age>
</person>
<person>
<name>Marry</name>
<age>22<age>
</person>
<person>
<name>Joe</name>
<age>25<age>
</person>
</friends>
<person>
artist In reply to Building XML Index File by artist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |