hi try //*[local-name()='Soda' ]/*[local-name()='Name' and contains(text(),'Coke')]/following-sibling::*[local-name()='ID']/text()
I use XPATH Checker in firefox to test out my XPATH queries...( https://addons.mozilla.org/en-US/firefox/addon/1095) regards deepak On Mon, Jun 8, 2009 at 6:12 PM, lkeith <laura.ke...@ensequence.com> wrote: > > I am trying to using the XPath extractor in JMeter to extract data from a > Soap response only if another node contains a certain keyword. > > Here is a example of part of the response: > ... > <b:Soda> > <b:Name>Diet Coke</b:Name> > <b:Description>Diet Cola</b:Description> > <b:ID>100</b:ID> > </b:Soda> > <b:Soda> > <b:Name>Coke Classic</b:Name> > <Description>Cola</b:Description> > <b:ID>110</b:ID> > </b:Soda> > ... > > I want to extract the ID of each of the sodas that have Coke in their name. > I've got as far as being able to identify the Sodas that have Coke in their > name with this: > > //*[local-name()='Soda'][contains(Name,'Coke')] > > , but I don't know what else to put in to extract the ID. > > I'm just guessing at this point. Here are a couple that I thought might be > close: > > //*[local-name()='Soda'][contains(Name,'Coke')]//*[local-name()='Soda']/*[local-name()='ID']/text() > > //*[local-name()='Soda'][contains(Name,'Coke')]/following-sibling::ID/text() > > Any assistance would be greatly appreciated! > > Cheers, > Laura > > -- > View this message in context: > http://www.nabble.com/Problems-extracting-data-using-XPath-extractor-tp23934824p23934824.html > Sent from the JMeter - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org > For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org > >