On 08/10/2008, Ed <[EMAIL PROTECTED]> wrote: > I'm trying to iterate over the elements of an xml file and get the assetID > of each element. I'm able to get the assetID of the first element > "FolderProperties", but none of the rest. > > How do I get some loop controller to continue down the xml elements and > process each "ChildFolder" element? > > The XML looks like this: > > <RootContents totalResults="18"> > <FolderProperties assetID="0cc80002" barkerSourceID="23071" > displayName="Tier3" parentAssetID="0cc80001" parentProviderID="*" > providerID="*"/> > <ChildFolder assetID="0cc8011f" barkerSourceID="23071" displayName="Top > Picks" parentAssetID="0cc80002" parentProviderID="*" providerID="*"/> > <ChildFolder assetID="0cc80101" barkerSourceID="23071" > displayName="Movies & Events" parentAssetID="0cc80002" > parentProviderID="*" providerID="*"/> > ... > <ChildFolder assetID="0cc80a7e" barkerSourceID="23071" > displayName="RNG-Level1" parentAssetID="0cc80002" parentProviderID="*" > providerID="*"/> > <ChildFolder assetID="0cc80bfa" barkerSourceID="23071" displayName="All > Movies" parentAssetID="0cc80002" parentProviderID="*" providerID="*"/> > </RootContents> > > I'm able to get the first asetID with > /RootContents/FolderProperties/@assetID > > But when I try to get the rest in a Loop Controller with > /RootContents/ChildFolder/@assetID > > I get only the first one "<FolderProperties assetID="0cc800002"...
Either use a loop counter: /RootContents/ChildFolder[n]/@assetID or use the XPath For Each feature, see: http://jakarta.apache.org/jmeter/usermanual/component_reference.html#XPath_Extractor read the section just after the parameter descriptions. Use a Debug Sampler to see what variables have been defined. > Thanks, > > > > -- > > Ed > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

