Query engine and query language for trees in PML format