<stránka
xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro">
<nadpis>Generating XML</nadpis>
<perex>converting relational data to XML</perex>
<m:pořadí-příkladu>00400</m:pořadí-příkladu>
<text xmlns="http://www.w3.org/1999/xhtml">
<p>
Relational data can be converted to various formats and one of them is the XML.
This is a good option for further processing e.g. using XSLT transformation or passing the XML data to some other tool.
Just use <code>relpipe-out-xml</code> instead of <code>relpipe-out-tabular</code> and the rest of the pipeline remains unchanged:
</p>
<m:pre jazyk="bash"><![CDATA[ssh example.com cat /etc/mtab | relpipe-in-fstab | relpipe-out-xml]]></m:pre>
<p>
Will produce XML like this:
</p>
<m:pre jazyk="xml" src="examples/relpipe-out-fstab.xml"/>
<p>
Thanks to XSLT, this XML can be easily converted e.g. to an XHTML table (<code>table|tr|td</code>) or other format.
Someone can convert such data to a (La)TeX table.
</p>
<p>
n.b. the format is not final and will change i future versions (XML namespace, more metadata etc.).
</p>
</text>
</stránka>