shithub: xmltools


branches: front

Clone

clone: git://shithub.us/sirjofri/xmltools gits://shithub.us/sirjofri/xmltools
push: hjgit://shithub.us/sirjofri/xmltools

Last commit

fb0e2e9c – sirjofri <sirjofri@sirjofri.de> authored on 2024/07/30 15:03
adds more functionality to xslt

About

XML tools

This package requires the updated libxml from 9atom and libxpath.
See also:
- https://shithub.us/sirjofri/xml-9atom/HEAD/info.html
- https://git.sr.ht/~sirjofri/xml-9atom


XQ: xml query

cat file.xml | xq '/path'
xq -f file.xml '/path'

path is an XPath (but not everything is supported).

Xq currently can handle some queries itself (without libxpath). To make use of these, you have to adjust the xq.c file to call 'query' instead of 'query2'. This is a leftover that will eventually be removed.

Limited XPath features (without libxpath):

- @attr: /hello/world/@attr
- text(): /hello/world/text()
- [@attr='value']: /hello/world[@attr='second']/stuff
- [2]: /hello/world[2]/stuff