(load "lib/tree/xml.egi") (define $xml1 }> }> }> }> }> }>) ;; List up all tags. (test (match-all xml1 xml [ _> [tag]])) ; {top middle1 middle2 middle3 bottom1 bottom4} ;; List up all nodes which has more than two same child nodes. (test (match-all xml1 xml [>>> [tag x]])) ; {[middle2 ] [middle2 ]} ;; List up all nodes which has more than two same descendant nodes. (test (match-all xml1 xml [ _>>>> [tag x]])) ; {[middle2 ] [middle2 ] [top ] [top ]}