Logics for XML