I have a method readFileContent
which will take an XML file as an input and read the content of the XML file and then outputs a String of XML-like data.
Now, this XML-like String will be the input parameter of another method extractActualData
that in turn will parse the XML-like String and produce the actual data as output.
My question is: Is it possible to parse a text file containing XML-like string using XmlSlurper
in Groovy?