Pull updates to Xml class from MediaWiki

Restricted to changes which do not introduce new dependencies:
 * code style
 * code cleanup
 * documentation improvements

+header.
Merge pull request #61 from Jarry1250/xmlupdate

Pull updates to Xml class from MediaWiki git repo