Fixed XML extraction