XPath casts in PostgreSQL