You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Ed <ej...@SummitBid.com> on 2008/10/08 19:57:31 UTC

XPath Extractor and simply getting an attribute

I need to get an attribute from a simple XML response, but I'm having
trouble with the syntax.

I want to get the assetID attribute from the FolderProperties tag:

<RootContents totalResults="18">
    <FolderProperties assetID="0cc80002" barkerSourceID="23071"
displayName="Tier3" parentAssetID="0cc80001" parentProviderID="*"
providerID="*"/>
</RootContents>

Here's what I have tried so far:
Reference Name: assetID
XPath query: /RootContents/FolderProperties[@name='assetID']
Default Value: NONE

Thanks in advance,


-- 
Ed

Re: XPath Extractor and simply getting an attribute

Posted by Ed <ej...@SummitBid.com>.
That's it. I knew it was simple. Thanks alot.

On Wed, Oct 8, 2008 at 12:31 PM, sebb <se...@gmail.com> wrote:

> On 08/10/2008, Ed <ej...@summitbid.com> wrote:
> > I need to get an attribute from a simple XML response, but I'm having
> >  trouble with the syntax.
> >
> >  I want to get the assetID attribute from the FolderProperties tag:
> >
> >  <RootContents totalResults="18">
> >     <FolderProperties assetID="0cc80002" barkerSourceID="23071"
> >  displayName="Tier3" parentAssetID="0cc80001" parentProviderID="*"
> >  providerID="*"/>
> >  </RootContents>
> >
> >  Here's what I have tried so far:
> >  Reference Name: assetID
> >  XPath query: /RootContents/FolderProperties[@name='assetID']
>
> That does not look right. I think you need:
>
> /RootContents/FolderProperties/@assetID
>
> >  Default Value: NONE
> >
> >  Thanks in advance,
> >
> >
> >  --
> >
> > Ed
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>


-- 
Ed

Re: XPath Extractor and simply getting an attribute

Posted by sebb <se...@gmail.com>.
On 08/10/2008, Ed <ej...@summitbid.com> wrote:
> I need to get an attribute from a simple XML response, but I'm having
>  trouble with the syntax.
>
>  I want to get the assetID attribute from the FolderProperties tag:
>
>  <RootContents totalResults="18">
>     <FolderProperties assetID="0cc80002" barkerSourceID="23071"
>  displayName="Tier3" parentAssetID="0cc80001" parentProviderID="*"
>  providerID="*"/>
>  </RootContents>
>
>  Here's what I have tried so far:
>  Reference Name: assetID
>  XPath query: /RootContents/FolderProperties[@name='assetID']

That does not look right. I think you need:

/RootContents/FolderProperties/@assetID

>  Default Value: NONE
>
>  Thanks in advance,
>
>
>  --
>
> Ed
>

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