change Hash#to_xml to convert xml with attribute and content properly