Hi
concat function didnt seem to work (if you can get it to work on JMeter then
great).
Im assuming you only have 1 car element per response
Write 4 XPATH extractors , that extract into variables
/CarsQueryResponse/cars/car/name/text()  -->carName
/CarsQueryResponse/cars/car/year/text()   -->year
etc etc..
And in jmeter.properties use sample_variables to specify carName,year so
that this will be written into the result file,
you can then extract them whenever you want with whatever delimiter.

Alternately you can write a BeanShell Listener which can do whatever you
code it to do(obtain a lock , read variables , append to file , release
lock)

regards
deepak

On Wed, Mar 17, 2010 at 1:48 PM, Prakash Viswanathan <
[email protected]> wrote:

> Is there a way in Jmeter to parse the web service response and write them
> into a CSV or some character Delimited File.
>
> e.g.
>
> Lets say that the following comes as the body in the web service responses
> in TWO consecutive threads
>
> <CarsQueryResponse>
> <cars>
> <car>
> <name>Honda</name>
> <year>2010</year>
> <model>Accord</model>
> <price>23,000</price>
> </car>
> </cars>
> </CarsQueryResponse>
>
> <CarsQueryResponse>
> <cars>
> <car>
> <name>Toyota</name>
> <year>2010</year>
> <model>Camry</model>
> <price>22,500</price>
> </car>
> </cars>
> </CarsQueryResponse>
>
>
> I would like to parse this XML and get the following in the output file
>
> Honda~2010~Accord~23,000
> Toyota~2010~Camry~22,500
>
> where ~ is the separator character.
>
> Any pointers here will be very helpful.
>
> Thanks
> Prakash
>

Reply via email to