Fix parsing of XML arrays

Previously only the first element of arrays were returned.
Merge pull request #258 from zbenjamin/xml-parsing-fix

Fix parsing of XML arrays