relpipe-data/examples-out-xml.xml
author František Kučera <franta-hg@frantovo.cz>
Sun, 09 May 2021 00:06:13 +0200
branchv_0
changeset 323 e2d607e4a4f4
parent 244 d4f401b5f90c
permissions -rw-r--r--
release-v0.18.sh: run apt install only once + small fixes and improvements

<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>