I'm not familiar with xquery, does it handle general graphs or only DAGs? Your mention of "objects and sub-objects" makes me think you're expecting a different use-case than actual graph databases, which deals more with peer-to-peer connections (like knowledge graphs) than hierarchical models.
XQuery is for the XML data model, which is a tree and not a graph.