Added xmlDump

Removed the replace '&gt;' -> '>', should be made by user himself..
(otherwise things that are intended to be '&gt;' will be changed as
well..)
Some slight changes in function arrangement
Simplified the json loops