change XML parsing to DOM, modified