XML : Groovy script to find and replace characters in a XML file

I have the below groovy script snippet, I want to replace some characters inside a list of xml files, How could I do this?

  println "Remove Invisible characters in CustomMetadata"  def customMetadata = ant.fileScanner {      fileset(dir: '${target.dir}') {          include(name: 'customMetadata/*.md')      }  }  // m is the file   for (m in customMetadata) {    //Want to get a content of the file and replace if there's any specified characters    println("Found file $m")    }    

Thanks

No comments:

Post a Comment