question: private static Element addBean ( Document doc , Node parent , Class < ? > cls ) { Element elem = doc . createElement ( "bean" ) ; elem . setAttribute ( "class" , cls . getName ( ) ) ; parent . appendChild ( elem ) ; return elem ; }
target:  Add bean to XML document.