![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 11/16/2022 10:09 PM, Thomas A. Schmitz via ntg-context wrote:
On 11/16/22 21:51, Denis Maier via ntg-context wrote:
Just a quick question regarding this? Is xml.filter equivalent to \xmlfilter? If so, how do you pass the match to a command as you'd do with \xmlfilter?
I'm still digesting and playing with Massi's reply; will probably be back with more questions :-)
Anyway:
If you've filtered something out like this
local tree = xml.filter (t, "../chapter[@title='mytitle'")
always keep in mind that some expressions return a list of matches, that can be looped over and some commands just process the first anyway, it can sometimes help to add print(tstring(tree)) so see what you got Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------