protected DOMOutputElement createAndAttachChild ( Element element ) { if ( mRootNode != null ) { mRootNode . appendChild ( element ) ; } else { mElement . appendChild ( element ) ; } return createChild ( element ) ; }
Simplest factory method which gets called when a 1 - argument element output method is called . It is then assumed to use the default namespace . Will both create the child element and attach it to parent element or lacking own owner document .