Created method to generate xml with XML::Compile