shithub: xml-9atom


branches: front

Clone

clone: git://shithub.us/sirjofri/xml-9atom gits://shithub.us/sirjofri/xml-9atom
push: hjgit://shithub.us/sirjofri/xml-9atom

Last commit

ce4a8027 – sirjofri <sirjofri@sirjofri.de> authored on 2024/07/14 11:44
adds yacc/lex parser

About

xml tools from 9atom as archived from
https://github.com/Plan9-Archive/9atom

plug-in repository for the following xml tools:

- libxml:
  /sys/include/xml.h
  /$objtype/lib/libxml.a
  /sys/man/2/xml
- xb:
  /$objtype/bin/xb
  /sys/man/1/xb
- libxpath: (not from 9atom)
  /sys/include/xpath.h
  /$objtype/lib/libxpath.a
  /sys/man/2/xpath

Installation:

mk install
mk clean (optional)

Deinstallation:

mk nuke

This will remove all the installed files.


Libxpath

currently supported rules:

- root path: /path/from/root
- functions: text(), position(), last(), node()
- filter/predicates: /path/to[path=path]
  - full path support: [path/to/@attr='hello']
  - type-safe: num==num, string==string, node==node
- node types:
  - name (/path)
  - string (/'hello')
  - number (/2)
  - function (/func())
- numbered element: /path/to/second[2]/element
- stepping:
  - /absolute/paths and relative/paths
  - descendant-or-self:: and //
  - child:: and x/y
  - attribute:: and @attr

There are probably bugs.