Bugfixes to address XML formatting

Repo version throws a fatal error as of March 2013. Needs array indices to get correct data from XML/DOM.
Merge pull request #852 from cmckendry/patch-1

Bugfixes to address XML formatting