Moved XML parsing to util