public String toXML(){
  StringBuffer str=new StringBuffer();
  str.append("<");
  str.append(XML_ROOT_ELEMENT);
  str.append(">");
  str.append("<");
  str.append(XML_ELEMENT_QUALITY_CODE);
  str.append(">");
  str.append(qualityCode);
  str.append("</");
  str.append(XML_ELEMENT_QUALITY_CODE);
  str.append(">");
  if (description != null) {
    str.append("<");
    str.append(XML_ELEMENT_QUALITY_DESC);
    str.append("><![CDATA[");
    str.append(description);
    str.append("]]></");
    str.append(XML_ELEMENT_QUALITY_DESC);
    str.append(">");
  }
  str.append("</");
  str.append(XML_ROOT_ELEMENT);
  str.append(">\n");
  return str.toString();
}

public String toXML ( ) { StringBuffer str = new StringBuffer ( ) ; str . append ( "<" ) ; str . append ( XML_ROOT_ELEMENT ) ; str . append ( ">" ) ; str . append ( "<" ) ; str . append ( XML_ELEMENT_QUALITY_CODE ) ; str . append ( ">" ) ; str . append ( qualityCode ) ; str . append ( "</" ) ; str . append ( XML_ELEMENT_QUALITY_CODE ) ; str . append ( ">" ) ; if ( description != null ) { str . append ( "<" ) ; str . append ( XML_ELEMENT_QUALITY_DESC ) ; str . append ( "><![CDATA[" ) ; str . append ( description ) ; str . append ( "]]></" ) ; str . append ( XML_ELEMENT_QUALITY_DESC ) ; str . append ( ">" ) ; } str . append ( "</" ) ; str . append ( XML_ROOT_ELEMENT ) ; str . append ( ">\n" ) ; return str . toString ( ) ; }
create an xml representation of a sourcedataquality object . the resulting xml can be used to create a sourcedataquality object using the class ' s fromxml method .
