getDocumentElement

Default implementation checks whether the source is a DOMSource, and uses a
org.jdom.input.DOMBuilder to create a JDOM org.jdom.Element. In all other cases, or when
alwaysTransform is true, the source is transformed into a
org.jdom.transform.JDOMResult, which is more expensive. If the passed source is null, null is returned.