public static String cleanNfo(String sourceNfoContent){
  try {
    Tidy tidy=new Tidy();
    tidy.setInputEncoding("UTF-8");
    tidy.setOutputEncoding("UTF-8");
    tidy.setWraplen(Integer.MAX_VALUE);
    tidy.setXmlOut(true);
    tidy.setSmartIndent(true);
    tidy.setXmlTags(true);
    tidy.setMakeClean(true);
    tidy.setForceOutput(true);
    tidy.setQuiet(true);
    tidy.setShowWarnings(false);
    StringReader in=new StringReader(sourceNfoContent);
    StringWriter out=new StringWriter();
    tidy.parse(in,out);
    return out.toString();
  }
 catch (  Exception e) {
  }
  return sourceNfoContent;
}

public static String cleanNfo ( String sourceNfoContent ) { try { Tidy tidy = new Tidy ( ) ; tidy . setInputEncoding ( "UTF-8" ) ; tidy . setOutputEncoding ( "UTF-8" ) ; tidy . setWraplen ( Integer . MAX_VALUE ) ; tidy . setXmlOut ( true ) ; tidy . setSmartIndent ( true ) ; tidy . setXmlTags ( true ) ; tidy . setMakeClean ( true ) ; tidy . setForceOutput ( true ) ; tidy . setQuiet ( true ) ; tidy . setShowWarnings ( false ) ; StringReader in = new StringReader ( sourceNfoContent ) ; StringWriter out = new StringWriter ( ) ; tidy . parse ( in , out ) ; return out . toString ( ) ; } catch ( Exception e ) { } return sourceNfoContent ; }
try to clean the nfo ( xml ) content with jtidy .
