http://qs321.pair.com?node_id=1045352


in reply to Re^4: How can I force findnodes() to check value of attributes in either xpath1 or xpath2?
in thread How can I force findnodes() to check value of attributes in either xpath1 or xpath2?

Have you thought about not printing things if you don't want them printed?

You could also try to make your program remember the current book while descending into the chapters.

I would first find all book:bookResource nodes, and then do a second XPath search relative to each book:bookResource node. This will mean you have to understand how you can walk through an XML tree using XPath.