shithub: xmltools

branches: front


clone: git:// gits://
push: hjgit://

Last commit

dd05e41b – sirjofri <> authored on 2024/07/11 11:33
uses libxpath


XML tools

This package requires libxml from 9atom and libxpath.
See also:

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