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;
}

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 ; }
add bean to xml document .
