[CLEANUP] Move the creation of the DOMDocument to a separate method.
Merge pull request #46 from jjriv/cleanup/create-document

[CLEANUP] Move the creation of the DOMDocument to a separate method.