Bug fix -- Xmlparser doesn't clear data if loaded again

Added truncate() method that clears and resets the class data. This is
called before the xml string is loaded.