Breaking an XML file into smaller XML files...
Posted: Wed Jul 28, 2010 5:24 pm
Hello all!
I have an XML file I have imported from MS Excel. I now need to break the document up into smaller XML documents, each uniquely named using an element value. My guess is I will have to dust off the XSLT textbooks, but I was hoping there was a quicker way to do this in Oxygen than me having to write the transformation. Suggestions for other ways to go about this problem are welcome!
The parent XML file...
Needs to be broken up into 3 separate XML files...
This file should be named 1977.xml
And this file should be named 1978.xml
Cheers, Paul
I have an XML file I have imported from MS Excel. I now need to break the document up into smaller XML documents, each uniquely named using an element value. My guess is I will have to dust off the XSLT textbooks, but I was hoping there was a quicker way to do this in Oxygen than me having to write the transformation. Suggestions for other ways to go about this problem are welcome!
The parent XML file...
Code: Select all
<row>
<dc:title>paul</dc:title>
<dc:creator>mom</dc:creator>
<dc:identifier>1977</dc:identifier>
</row>
<row>
<dc:title>brad</dc:title>
<dc:creator>dad</dc:creator>
<dc:identifier>1978</dc:identifier>
</row>
<row>
<dc:title>melissa</dc:title>
<dc:creator>mom and dad</dc:creator>
<dc:identifier>1979</dc:identifier>
</row>
This file should be named 1977.xml
Code: Select all
<row>
<dc:title>paul</dc:title>
<dc:creator>mom</dc:creator>
<dc:identifier>1977</dc:identifier>
</row>
Code: Select all
<row>
<dc:title>brad</dc:title>
<dc:creator>dad</dc:creator>
<dc:identifier>1978</dc:identifier>
</row>
Cheers, Paul