[CWB] xml searches...

Stephanie Evert stefanML at collocations.de
Wed Jul 1 11:52:11 CEST 2026



> Is there any way I can search for xml tags inside other xml tags? Something like
> n: <orw>[]+</orw> :: n.div2_n="1";

You need to set the label on some token within the region, typically the first one:

	<orw> n:[] []* </orw> :: n.div2_n="1";

Or you could use the implicitly defined match or matchend anchors as long as the region of interest is at the start or end of the query:

	<orw>[]+</orw> :: match.div2_n="1";

Another – faster – option is to do the check inline, but I generally prefer the global constraint for readability:

	<orw> [ _.div2_n="1" ] []*</orw> :: 

Best,
Stephanie

> (which doesn't work, as it is gross improvisation!).
> Many thanks in advance for any help!
> Best,
> Graham.
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://liste.sslmit.unibo.it/mailman/listinfo/cwb



More information about the CWB mailing list