Read XML with nested values

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
3 posts Page 1 of 1

rvelde

Posts: 3
Joined: Fri Aug 08, 2014 6:40 am

Post by rvelde » Tue Aug 26, 2014 8:07 am
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?

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Tue Aug 26, 2014 11:01 am
Change your "Keystring" in your path to "KeyString" (as it is in your XML file)
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696

rvelde

Posts: 3
Joined: Fri Aug 08, 2014 6:40 am

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

This seemed to help thank you
3 posts Page 1 of 1