I want to store XML documents in a database, and perform queries such as:
"Elem1 with attribute attr1, with a sibling Elem2 with attribute attr2, with a distance of at most 2 between the siblings".
I know I can break this into two queries (elem1,attr1, then elem2,attr2 under elem1's parent) then check the distances - but is there a database that supports this kind of query without requiring me to break it?