June 2000
Intermediate to advanced
556 pages
8h 45m
English
In chapter 8, we made xgrep XML-aware by allowing it to feed off the PYX notation produced by xmln and xmlv.
In this chapter, we extend xgrep again by allowing it to answer queries like these.
Find “Sean” anywhere within a name element.
Print the text content of price elements.
Count the number of invoice elements that have an overdue child element.
All the above queries share a common characteristic: They are most easily answered by modelling XML as a hierarchical structure. Answering queries like these with xgrep as it currently stands is not possible.
We can find “Sean” in data content easily, but we cannot restrict matches to “Sean” occurring somewhere within a name element.
What we need to answer these ...
Read now
Unlock full access