XPath is not procedural. It is entirely composed of expressions that compose and return results. The closest common language might be SQL.