I am trying to create a script that will search for an xml raw request that contains multiple xml tags and copies the result to an external file or custom property in SoapUI.
Currently I am trying with this:
// read the file from path
def file = new File('PathToLogFile.log')
def data= file.filterLine {
it =~ /(?ms)(<OpeningRequestTag">[\s\S]*?<\/ClosingRequestTag)/
}
The problem is that it can't read the blocks containing these opening and closing tags, which is a bit strange since I have checked the regular expression definition it regex101 and it finds what I need.
I have also tried with
def data= file.filterLine {
it =~ /(?ms)(<OpeningRequesTag">[\s\S]*?<\/ClosingRequestTag)/
but again - nu luck :(. Can you tell me what should I change in order to select the set or xml tags that I want? Note that the opening and closing tags also differ and are not the same - the opening tag contains additional information. It looks like :
<RequestTag 343.75676.76.767>
.
.
.
<RequestTag>
Thank you!