add toArray method (XMLDocument)