XmlStarlet User’s Guide and IBM link regarding PYX

http://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html http://www-106.ibm.com/developerworks/xml/library/x-matters17.html – does no longer work as of 2017-10-02 (probably quite a little earlier already) http://www.ibm.com/developerworks/xml/library/x-matters17.html – does no longer work as of 2021-08-31 (probably quite a little earlier already) https://www.ibm.com/developerworks/xml/library/x-matters17/x-matters17-pdf.pdf – this is the actual and relevant document (broken link as of 2021-08-31) https://duckduckgo.com/?q=xml+pyx

your ODF file (“.odt”, “.ods”, …) and its “modified” timestamp

https://en.wikibooks.org/wiki/XML_-_Managing_Data_Exchange/OpenOffice.org_%26_OpenDocument_Format https://github.com/JochenHayek/misc/blob/master/using_timestamps_in_filenames/create_snapshot_from_ODF.sh https://en.wikipedia.org/wiki/XMLStarlet Your “.odt” (or “.ods”) file is a ZIP file with a meta.xml inside: $ unzip -l YOUR.ods … … meta.xml … This is a convenient way to extract meta.xml to STDOUT: $ unzip -p YOUR.ods meta.xml … This is how to get the XML reformatted using xmlstartlet: $ unzip -p YOUR.ods meta.xml… Continue reading your ODF file (“.odt”, “.ods”, …) and its “modified” timestamp

xmlstarlet: how to deal with a default namespace in XPath expressions?

I ran into this problem, when I tried to extract values from JasperReport’s JRXML using xmlstarlet. JRXML files introduce a default namespace (which does not seem to serve a lot), and XPath processors need to take that into account. When I searched for help in xmlstarlet’s documentation and on the web, I came across this… Continue reading xmlstarlet: how to deal with a default namespace in XPath expressions?

your OOXML file (“.docx”, “.xlsx”, “.vsdx”, …) and its “modified” timestamp

https://en.wikipedia.org/wiki/Office_Open_XML_file_formats https://github.com/JochenHayek/misc/blob/master/using_timestamps_in_filenames/create_snapshot_from_OOXML.sh https://en.wikipedia.org/wiki/XMLStarlet VSDX does not get listed as an OOXML conform file format, but for this purpose (here) we can treat it like one. Your “.docx” (or “.xlsx”) file is a ZIP file with a docProps/core.xml inside: $ unzip -l YOUR.docx … … docProps/core.xml … This is a convenient way to extract docProps/core.xml to… Continue reading your OOXML file (“.docx”, “.xlsx”, “.vsdx”, …) and its “modified” timestamp

my 2017 Windows working environment

All these packages resp. utilities do not require Windows admin rights for getting them “installed” – actually they do not need “a Windows system installation”. Below C:\Users\jhayek I created a couple of subdirectories: opt: every package resp. utility has its own subdirectory below there bin: some .bat and .sh (BusyBox ash) scripts go there Packages resp. utilities:… Continue reading my 2017 Windows working environment

creating diary entries from my (little) blog articles

https://codex.wordpress.org/WordPress_Feeds https://codex.wordpress.org/WordPress_Feeds#Finding_Your_Feed_URL 1st approach: xmlstarlet with an XPath expression (rss/channel/item/link) + shell wrapper. 2nd approach: XQuery script looping over rss/channel/item (+ shell wrapper). I am glad to upload it to my github area, in case somebody is interested. Update 2016-08-26: By default WordPress creates an RSS feed with just 10 entries. I don’t create my diary entries… Continue reading creating diary entries from my (little) blog articles

after a couple of months using XPath and xmlstarlet I created my first lenghty XQuery script using Saxon9HE

“In production” I have been using a Bash+xmlstarlet script, that I wanted to optimise by rewriting it into an XQuery script. This would be my 1st XQuery script after a couple of months of exercising XQuery through Priscilla Walmsley’s book and Saxon9HE – a couple of hours per week only because of my entire workload. During… Continue reading after a couple of months using XPath and xmlstarlet I created my first lenghty XQuery script using Saxon9HE

XmlStarlet UG on “Studying Structure of XML Document” – “xmlstarlet elements …”

http://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html#idm47077139665568 http://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html I really like “xmlstarlet elements …” – but these very nice and useful XPath expressions come without index. So what if you really, really need them with indexes? I am not sure, you can write a general utility, that rewrites these XPath expressions without index into XPath expressions with index, but for my… Continue reading XmlStarlet UG on “Studying Structure of XML Document” – “xmlstarlet elements …”

extract your build steps from a Jenkins CI job to ordinary and “easy to edit” flat files

Over time Jenkins jobs can grow into something “a little confusing”, in other words: like cancer. The Jenkins developers were thoughtful enough to provide an API to all the data structures, that Jenkins and its jobs operate on, so we are able to export an entire Jenkins job as XML. You certainly do not want… Continue reading extract your build steps from a Jenkins CI job to ordinary and “easy to edit” flat files