0

Virtual Earth からの応答として取得したこの XML を解析しようとしています。

<Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/search/local/ws/rest/v1">
<Copyright>
Copyright © 2013 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.
</Copyright>
<BrandLogoUri>
http://dev.virtualearth.net/Branding/logo_powered_by.png
</BrandLogoUri>
<StatusCode>200</StatusCode>
<StatusDescription>OK</StatusDescription>
<AuthenticationResultCode>ValidCredentials</AuthenticationResultCode>
<TraceId>
ebbe16390026429f967a06977c3bc94c|MIAM000025|02.00.150.1300|MIAMSNVM001367, EWRMSNVM003182
</TraceId>
<ResourceSets>
<ResourceSet>
<EstimatedTotal>1</EstimatedTotal>
<Resources>
<Location>
<Name>TE-V 1009, 44167 Camañas (TE)</Name>
<Point>
<Latitude>40.640868544578552</Latitude>
<Longitude>-1.1300414800643921</Longitude>
</Point>
<BoundingBox>
<SouthLatitude>40.637005827007876</SouthLatitude>
<WestLongitude>-1.1368284398869133</WestLongitude>
<NorthLatitude>40.644731262149229</NorthLatitude>
<EastLongitude>-1.1232545202418709</EastLongitude>
</BoundingBox>
<EntityType>Address</EntityType>
<Address>
<AddressLine>TE-V 1009</AddressLine>
<AdminDistrict>Aragon</AdminDistrict>
<AdminDistrict2>TE</AdminDistrict2>
<CountryRegion>Spain</CountryRegion>
<FormattedAddress>TE-V 1009, 44167 Camañas (TE)</FormattedAddress>
<Locality>Camañas</Locality>
<PostalCode>44167</PostalCode>
</Address>
<Confidence>Medium</Confidence>
<MatchCode>Good</MatchCode>
<GeocodePoint>
<Latitude>40.640868544578552</Latitude>
<Longitude>-1.1300414800643921</Longitude>
<CalculationMethod>Interpolation</CalculationMethod>
<UsageType>Display</UsageType>
<UsageType>Route</UsageType>
</GeocodePoint>
</Location>
</Resources>
</ResourceSet>
</ResourceSets>
</Response>

ここまたはどこかで私に役立つ可能性のある答えを探しました。しかし、誰もが別の方法で欲しいものを尋ねましたが、何も見つかりませんでした。「住所」で構成される「地域」の値を文字列値として取得したいだけです。

この XML を MyXMLString という名前の文字列として持っています。

前もって感謝します。

4

1 に答える 1