# HG changeset patch # User František Kučera # Date 1544112689 -3600 # Node ID c952261978e8ada3093e44e652a1374cf6f9fb0c # Parent e33f13c9128988fdcf983e8efd5a8d664edee63f examples: relpipe-out-xml diff -r e33f13c91289 -r c952261978e8 relpipe-data/examples.xml --- a/relpipe-data/examples.xml Thu Dec 06 16:15:53 2018 +0100 +++ b/relpipe-data/examples.xml Thu Dec 06 17:11:29 2018 +0100 @@ -157,6 +157,82 @@ n.b. the relpipe-in-fstab reads the /etc/fstab if executed on TTY. Otherwise, it reads the STDIN.

+

relpipe-out-xml

+ +

+ 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 relpipe-out-xml instead of relpipe-out-tabular and the rest of the pipeline remains unchanged: +

+ + + +

+ Will produce XML like this: +

+ + + + + fstab + + UUID + 29758270-fd25-4a6c-a7bb-9a18302816af + / + ext4 + relatime,user_xattr,errors=remount-ro + 0 + 1 + + + + /dev/sr0 + /media/cdrom0 + udf,iso9660 + user,noauto + 0 + 0 + + + + /dev/sde + /mnt/data + ext4 + relatime,user_xattr,errors=remount-ro + 0 + 2 + + + UUID + a2b5f230-a795-4f6f-a39b-9b57686c86d5 + /home + btrfs + relatime + 0 + 2 + + + + /dev/mapper/sdf_crypt + /mnt/private + xfs + relatime + 0 + 2 + + +]]> + +

+ Thanks to XSLT, this XML can be easily converted e.g. to an XHTML table (table|tr|td) or other format. + Someone can convert such data to a (La)TeX table. +

+ +

+ n.b. the format is not final and will change i future versions (XML namespace, more metadata etc.). +

+ +

relpipe-tr-validator