in reply to writing null/empty data as "HASH(0x1b635c4)" ,xml file

Easiest: Use option ForceContent => 1 and add ->{content} everywhere you want the text of an element.