Generate base of XML document from gool AST.