question: public static SourceDataQuality fromXML ( Element domElement ) { NodeList fields = domElement . getChildNodes ( ) ; int fieldsCount = fields . getLength ( ) ; String fieldName ; String fieldValueString ; Node fieldNode ; SourceDataQuality result = new SourceDataQuality ( ) ; for ( int i = 0 ; i != fieldsCount ; i ++ ) { fieldNode = fields . item ( i ) ; if ( fieldNode . getNodeType ( ) == Node . ELEMENT_NODE ) { fieldName = fieldNode . getNodeName ( ) ; Node fieldValueNode = fieldNode . getFirstChild ( ) ; if ( fieldValueNode != null ) { fieldValueString = fieldValueNode . getNodeValue ( ) ; } else { fieldValueString = "" ; } if ( fieldName . equals ( XML_ELEMENT_QUALITY_CODE ) ) { result . qualityCode = Short . parseShort ( fieldValueString ) ; } else if ( fieldName . equals ( XML_ELEMENT_QUALITY_DESC ) ) { result . description = fieldValueString ; } } } return result ; }
target:  Create a SourceDataQuality object from its XML representation. The format of the XML required is determined by the output of the toXML() method.