jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hansen <tchan...@xmission.com>
Subject Question on Jmeter XPATH extraction
Date Thu, 27 Jul 2006 19:15:54 GMT
My name is Chris Hansen; nice to meet you!

I'm working for the first time with  Jmeter and while I've got most of
what I need from the website and wiki, I have a case I can't quite
figure out how to make work and I was wondering if you knew how to do it
or if you had a ready reference you could refer me to.

I've been using the Regular Expression Extractor from the Post
Processors and it works fine for me except in one case.  My regular
expression matches in two places in the returning XML where I need it to
match in one.

<CAPs>
  <CAP>
    <Keys>
      <Key>KEY1</Key>
      <Key>KEY2</Key>
      <Key>KEY3</Key>
    </Keys>
...
    <Parcels>
      <Parcel>
        <CAPs>
            <CAP>
              <Keys>
                <Key>KEY1</Key>
                <Key>KEY2</Key>
                <Key>KEY3</Key>
              </Keys>
...

I'd rather use the XPATH extractor but using this as my value:

/GovXML/GetCAPsResponse/CAPs/CAP/Keys/text()

gets the value of the first <Key> element, not the set.  I'd like to use

/GovXML/GetCAPsResponse/CAPs/CAP/Keys/

To extract the elements contained in the reference element, but I can't
seem to get it to work.  The structure at that point is like this

<CAP>
        <Keys>
                <Key>KEY1</Key>
                <Key>KEY2</Key>
                <Key>KEY3</Key>
        </Keys>
…

And I'd like to be able to extract the entire <Keys>…</Keys> if possible.

Also, a second question:  is there any way with the XPATH extractor to
pull out a set like you can do with the Regular Expression Extractor?

Thanks for any assistance you can provide.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message