Commit Diff
Diff:
ad176ac792e7045a3aeb3f107a8dd99fd8b3419f
11cabf8af8ac22dd13dce887d8071f2cb58f92ad
Commit:
11cabf8af8ac22dd13dce887d8071f2cb58f92ad
Tree:
b882c9cace6454d0ca06ba6e513cf2850bf7d08a
Author:
fredgnix <fredgnix@a8afeb8c-277c-4b4a-a4f6-ef4c85adc32b>
Committer:
fredgnix <fredgnix@a8afeb8c-277c-4b4a-a4f6-ef4c85adc32b>
Date:
Thu Apr 19 14:50:27 2012 UTC
Message:
fix xml format
blob - e707c1cc2b17a1173952b7bfc3c99d89bfcea825
blob + efae4bdcfdb53d1ceede445fc0083ca19d23eccc
--- Pkgtxt2db.pm
+++ Pkgtxt2db.pm
@@ -213,18 +213,20 @@ sub tojson {
sub toxml {
my $outx = "$target-$release.xml";
open(X, ">$outx") or die "Unable to open $outx for writing, aborting.";
- print X "<?xml version=\"1.1\" encoding=\"UTF-8\" ?>\n";
- print X "<packages>";
+ print X "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
+ print X "<packages>\n";
for my $p (keys %pkgdb) {
- print X "\t<pkgname>$p</pkgname>\n";
- print X "\t<pkgver>$pkgdb{$p}[1]</pkgver>\n";
- print X "\t<arch>$pkgdb{$p}[2]</arch>\n";
- print X "\t<pkgver>$pkgdb{$p}[3]</pkgver>\n";
- print X "\t<location>$pkgdb{$p}[4]</location>\n";
- print X "\t<dep>$pkgdb{$p}[5]</dep>\n";
- print X "\t<sizeC>$pkgdb{$p}[6]</sizeC>\n";
- print X "\t<sizeU>$pkgdb{$p}[7]</sizeU>\n";
- print X "\t<pkgdesc>$pkgdb{$p}[8]</pkgdesc>\n";
+ print X "\t<package>\n";
+ print X "\t\t<pkgname>$p</pkgname>\n";
+ print X "\t\t<pkgver>$pkgdb{$p}[1]</pkgver>\n";
+ print X "\t\t<arch>$pkgdb{$p}[2]</arch>\n";
+ print X "\t\t<pkgver>$pkgdb{$p}[3]</pkgver>\n";
+ print X "\t\t<location>$pkgdb{$p}[4]</location>\n";
+ print X "\t\t<dep>$pkgdb{$p}[5]</dep>\n";
+ print X "\t\t<sizeC>$pkgdb{$p}[6]</sizeC>\n";
+ print X "\t\t<sizeU>$pkgdb{$p}[7]</sizeU>\n";
+ print X "\t\t<pkgdesc>$pkgdb{$p}[8]</pkgdesc>\n";
+ print X "\t</package>\n";
}
print X "</packages>\n";
}
Frédéric Galusik