'\" -*- coding: us-ascii -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH dctrl2xml 1 "20 August 2010" "" "" .SH NAME dctrl2xml \- Debian control data to XML converter .SH SYNOPSIS 'nh .fi .ad l \fBdctrl2xml\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu [-x | -j] [-f \fIFILE\fR] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBdctrl2xml\fR is a tool that converts Debian control data into an XML representation. It can be used to convert data which is normally found in debian/control, .changes, .dsc, Packages, Sources, and similar files to XML. .PP For most fields \fBdctrl2xml\fR just uses the field name as element name and the field data as element content. For other fields, such as package interrelationship fields (Depends, Build-Depends, etc.) or the Files field in .changes or Sources files, \fBdctrl2xml\fR additionally parses their field data to represent it in a more fine-structured form. .SH OPTIONS For a full summary of options, run \fBdctrl2xml\fR \*(T<\fB\-\-help\fR\*(T>. .TP \*(T<\fB\-\-version\fR\*(T> Show dctrl2xml's version number. .TP \*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> Show help about options. .TP \*(T<\fB\-f \fR\*(T>\fIFILE\fR, \*(T<\fB\-\-file=\fR\*(T>\fIFILE\fR Read Debian control data from file \fIFILE\fR instead of standard input. \fIFILE\fR can be either a plain text file or a gzip, bzip2 or ZIP file. .TP \*(T<\fB\-x\fR\*(T>, \*(T<\fB\-\-xml\fR\*(T> Output Debian control data as XML (default). .TP \*(T<\fB\-j\fR\*(T>, \*(T<\fB\-\-json\fR\*(T> Output Debian control data as JSON. .SH EXAMPLES .TP \*(T<\fBdctrl2xml \-f /var/lib/dpkg/available\fR\*(T> Convert the whole \fBdpkg\fR(1) available file to XML and print it to standard output. This is a typical stress test for \fBdctrl2xml\fR. .TP \*(T<\fBapt\-cache show hello build\-essential | dctrl2xml\fR\*(T> Convert the package records of the hello and build-essential packages to XML and print it to standard output. This is an example of how \fBdctrl2xml\fR can be used in pipes where it reads the control data from standard input. .TP \*(T<\fBapt\-cache showsrc hello | dctrl2xml | xmllint \-\-format \-\fR\*(T> This is similar to the above example, except that the \fBxmllint\fR(1) tool (which is in the libxml2-utils Debian package) is used to reformat and reindent \fBdctrl2xml\fR's output to make it more human readable and that the source package records of the hello package are used. .TP \*(T<\fBapt\-cache showsrc hello | dctrl2xml \-j\fR\*(T> In this example hello's source package record is printed as JSON instead of XML. .SH "SEE ALSO" \fBdeb-control\fR(5) .SH AUTHOR Written by Frank S. Thomas <\*(T>.