header
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome, Guest. Please login or register.
July 04, 2008, 01:55:26 am
Username: Password:
Login with username, password and session length

Forgot your password?
 
Multiple Child elements
Welcome, Guest. Please login or register.
July 04, 2008, 01:55:26 am
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  Multiple Child elements
« previous next »
Pages: [1] Print
Author Topic: Multiple Child elements  (Read 177 times)
mohbubur rahman
Newbie
*
Posts: 14


« on: May 09, 2008, 05:59:44 am »

Hi,

I have a response of the followin;

<CachingBlock>
            <CachingEntry>
               <ChunkPrefix>arce sceptra</ChunkPrefix>
               <ChunkName>circum claustra fremunt</ChunkName>
               <ChunkStartTime>2017-08-17T12:44:20</ChunkStartTime>
               <ChunkDuration>P1Y4DT12H44M37S</ChunkDuration>
            </CachingEntry>
            <CachingEntry>
               <ChunkPrefix>arce sceptra2</ChunkPrefix>
               <ChunkName>circum claustra fremunt2</ChunkName>
               <ChunkStartTime>2017-08-17T12:44:20</ChunkStartTime>
               <ChunkDuration>P1Y4DT12H44M372</ChunkDuration>
            </CachingEntry>
         </CachingBlock>

I am trying to use xpaths to get all the occurences of '<ChunkName>', I have tried many variation of xpaths including '//ChunkName', when I use log.info it only displays the first entry. it works when I specify which parent it is [1] or [2], but I want to be able to automatically capture all occurences. Is this possible?

Regards,

Moks
Logged
omatzura
soapui pro users
Hero Member
*
Posts: 1,071


« Reply #1 on: May 09, 2008, 02:01:46 pm »

Hi!

can you show the exact code you are running in your script to do this?

regards,

/Ole
eviware.com
Logged
mohbubur rahman
Newbie
*
Posts: 14


« Reply #2 on: May 12, 2008, 03:20:50 am »

This is from the property Transfer action.

declare namespace tim='http://www.reuters.com/ns/2007/10/25/webservices/TimeSeriesForCommonPlatform_1';
//tim:TimeSeries_1_Response[1]/CachingBlock[1]//ChunkName[1]


I am now trying to use a groovy script to start from 1 until that xpath returns a empty string.

def response2 = context.expand( '${GetTimeSeries_1 - Request 1#Response#//CachingBlock[1]/CachingEntry[1]/ChunkName[1]}' )

So replacing CachingEntry[n], buty having problems with putting this is an string due the # value.
Logged
mohbubur rahman
Newbie
*
Posts: 14


« Reply #3 on: May 12, 2008, 04:56:30 am »

I have been able to do this using Groovy script, but it would be nice to know if the same result can be achieved via the built in functionality, using property transfers
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
header header
header
header