public static Element createRootElement ( String tagName ) throws AlipayApiException { Document doc = newDocument ( ) ; Element root = doc . createElement ( tagName ) ; doc . appendChild ( root ) ; return root ; }
Creates a root element as well as a new document with specific tag name .