Your program should behave as follows
(assuming the executable is named "DOMcat"):
> DOMcat -sb test.xml
Total number of nodes: 15
Number of element nodes: 7
Number of attribute nodes: 3
Number of text nodes: 5
Number of empty text nodes: 5
Maximal height: 4
Maximal length of sibling list: 4
Number of distinct element names: 7
Number of distinct attribute names: 3
author, 1, {first, last}, {first, last}
book, 1, {author, price, publisher, title}, {author, first, last, price, publisher, title}
first, 1, {}, {}
last, 1, {}, {}
price, 1, {}, {}
publisher, 1, {}, {}
title, 1, {}, {}
Average height: 3.4000
Average length of sibling lists: 1.5714
Maximal breadth: 5
Average breadth: 3.0000
Total bytes in text/attribute values: 73
Proportion text/attribute of document: 34.3%