moved some XML helpers