public final String validate ( String in , String type ) { CShaniDomParser parser = new CShaniDomParser ( ) ; Document doc = parser . parse ( new StringReader ( in ) , getTags ( type ) , getMerge ( type ) ) ; if ( doc != null ) return doc . toString ( ) ; else return in ; }
validate for xml the string in using the rules type type