Page 1 of 1

Read XML with nested values

Posted: Tue Aug 26, 2014 8:07 am
by rvelde
I'm trying to read an xml formatted like this:

Code: Select all
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
	<s:Body>
		<ocFindSubscribersResponse xmlns="http://www.europ-assistance.nl/2010/12/sis">
			<ocFindSubscribersResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
				<Subscriptions>
					<dcSubscription>
						<StringFields>
							<KeyString>
								<Key>Type verzekering</Key>
								<Value>auto</Value>
							</KeyString>
							<KeyString>
								<Key>VehicleBrand</Key>
								<Value>Fiat</Value>
							</KeyString>
							<KeyString>
								<Key>VehicleModel</Key>
								<Value>Panda</Value>
							</KeyString>
						</StringFields>
					</dcSubscription>
				</Subscriptions>
			</ocFindSubscribersResult>
		</ocFindSubscribersResponse>
	</s:Body>
</s:Envelope>
I'm trying with all kind of variations on
Code: Select all
			<xmlRead file="Response_${Kenteken}.xml" validation="none" version="1.0">
				<rowset name="RowSet" nestedSharedValues="false">
					<column index="1" value="/s:Envelope/s:Body/ocFindSubscribersResponse/ocFindSubscribersResult/Subscriptions/dcSubscription/StringFields/Keystring/Key" name="Key" />
					<column index="2" value="/s:Envelope/s:Body/ocFindSubscribersResponse/ocFindSubscribersResult/Subscriptions/dcSubscription/StringFields/Keystring/Value" name="Value" />
				</rowset>
			</xmlRead>
could someone tell me how to approach this?

Re: Read XML with nested values

Posted: Tue Aug 26, 2014 11:01 am
by Support_Rick
Change your "Keystring" in your path to "KeyString" (as it is in your XML file)

Re: Read XML with nested values

Posted: Wed Aug 27, 2014 1:50 am
by rvelde
Oops sorry,

This seemed to help thank you