Reorganized methods in XML class.