Better way to this ?? Query database to xml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The ugly string

rpm -qa --qf '<package name="%{name}">\n  \
<epoch>%{epoch}</epoch>\n  \
<version>%{version}</version>\n  \
<release>%{release}</release>\n  \
<arch>%{arch}</arch>  \
<summary>%{summary}</summary>\n  <vendor>%{vendor}</vendor>\n</package>\n'

The issue - it can produce malformed xml because vendor string can and does sometimes contain < and >

I'm thinking there probably is a better to do it with python straight from the database? Maybe even something already exists for this?
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux