@Override public void encodeXML(Document doc,Element root,String elementName){
  if ((doc == null) || (root == null) || (elementName == null)) {
    return;
  }
  Element dataSourceElement=doc.createElement(elementName);
  for (  String key : propertyMap.keySet()) {
    Element element=doc.createElement(key);
    element.appendChild(doc.createTextNode(propertyMap.get(key)));
    dataSourceElement.appendChild(element);
  }
  root.appendChild(dataSourceElement);
}

@ Override public void encodeXML ( Document doc , Element root , String elementName ) { if ( ( doc == null ) || ( root == null ) || ( elementName == null ) ) { return ; } Element dataSourceElement = doc . createElement ( elementName ) ; for ( String key : propertyMap . keySet ( ) ) { Element element = doc . createElement ( key ) ; element . appendChild ( doc . createTextNode ( propertyMap . get ( key ) ) ) ; dataSourceElement . appendChild ( element ) ; } root . appendChild ( dataSourceElement ) ; }
encode the data source properties to xml .
