Does anyone already have a script that can take a xml file and turn it into a comma deliniated file. I'm starting on a opensuse2ppm script similarly to barryk's mageia2ppm and would like to start with a automated step1 as there are 19098 packages in the opensuse set at the moment(, up from 18880 last month). I'm actually thinking of stripping out lines we don't need as step0 as the source filesize is some 76meg and that should make it quicker to process the rest.
source xml is in this format if anyones interested:
Code: Select all
<package type="rpm">
<name>844-ksc-pcf</name>
<arch>noarch</arch>
<version epoch="0" ver="19990207" rel="784.1.1"/>
<checksum type="sha256" pkgid="YES">ec26988a001df41bd1752aeb035608edbf1ef5ec646569d63a7d938228a6ff4d</checksum>
<summary>Korean 8x4x4 Johab Fonts</summary>
<description>Korean 8x4x4 johab fonts.</description>
<packager>http://bugs.opensuse.org</packager>
<url>http://www.debian.or.kr/~cwryu/archive/fonttools/</url>
<time file="1319310585" build="1319310562"/>
<size package="2592518" installed="4382509" archive="4403032"/>
<location href="noarch/844-ksc-pcf-19990207-784.1.1.noarch.rpm"/>
<format>
<rpm:license>Public Domain, Freeware</rpm:license>
<rpm:vendor>openSUSE</rpm:vendor>
<rpm:group>System/X11/Fonts</rpm:group>
<rpm:buildhost>build25</rpm:buildhost>
<rpm:sourcerpm>844-ksc-pcf-19990207-784.1.1.src.rpm</rpm:sourcerpm>
<rpm:header-range start="872" end="39087"/>
<rpm:provides>
<rpm:entry name="locale(xorg-x11:ko)"/>
<rpm:entry name="844-ksc-pcf" flags="EQ" epoch="0" ver="19990207" rel="784.1.1"/>
</rpm:provides>
<rpm:requires>
<rpm:entry name="perl" pre="1"/>
<rpm:entry name="/bin/sh"/>
<rpm:entry name="aaa_base" pre="1"/>
<rpm:entry name="/bin/sh" pre="1"/>
</rpm:requires>
</format>
</package>
scsijon