Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
16 years ago

search XML via http request

Hello,
I have a http call which returns a XML back. it looks something like this



 
    aa.item.mostpopular
    development
    series
   
   
    20
 

 
   
     
        series
        4497123
        Grey's Anatomy
        400533
     

     
        series
        2545072
        CSI: Crime Scene Investigation
        389736
     


..........................

I also have a web service call which returns me a series of 'titles'.

I want to make sure the titles returned by my web service are not present in the 'title' returned by my http call.

can you help me with groovy such that title from the http call are stored in some array, if any of the titles are present in my web service response then fail the test case.

thanks

Ali

2 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Ali,

    I suggest you create a groovy script for this that uses the XmlHolder.getNodeValues( ".." ) for both responses and then does a simple check into the corresponding lists for doubles. If you show me two complete response messages I'll try to create the script for you.

    regards,

    /Ole
    eviware.com