relpipe-data/examples-out-xml.xml
branchv_0
changeset 244 d4f401b5f90c
parent 241 f71d300205b7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/relpipe-data/examples-out-xml.xml	Tue Feb 05 19:18:28 2019 +0100
@@ -0,0 +1,36 @@
+<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>