Converted to use xmltodic