🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.bazy-danych.msaccess
Article #136985

Re: Google Maps i VBA Access- pobieranie koordynatów - wyświetlanie mapy w formularzu - kod, który kiedyś działał

#136985
From: Zbigniew Bratko
Date: Sun, 20 Sep 2015 20:07
46 lines
2615 bytes
W dniu 2015-09-18 o 17:42, Zbigniew Bratko pisze:

[...]

>
> i małe pytanko na koniec.
>
> Czy ktoś potrafi dobrać się do wartości lon i lat z poniższego XML'a,
> za pomocą MSXML2.DOMDocument.
>
> Coś w rodzaju:
>
>      'Set xmlNodeList = xmldoc.selectNodes("//searchresults/place")
>      'Set myNode = xmldoc.SelectSingleNode("//searchresults/place")
>
> czy coś podobnego.
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <searchresults timestamp='Fri, 18 Sep 15 15:33:52 +0000'
> attribution='Data © OpenStreetMap contributors, ODbL 1.0.
> http://www.openstreetmap.org/copyright' querystring='170
> Kornatka,Dobczyce,myślenicki,małopolskie,polska' polygon='false'
> exclude_place_ids='35513053'
> more_url='http://nominatim.openstreetmap.org/search.php?format=xml&amp;exclude_place_ids=35513053&amp;q=170+Kornatka%2CDobczyce%2Cmy%C5%9Blenicki%2Cma%C5%82opolskie%2Cpolska'>
>
> <place place_id='35513053' osm_type='node' osm_id='2823660213'
> place_rank='30'
> boundingbox="49.8480835,49.8481835,20.0808957,20.0809957"
> lat='49.8481335' lon='20.0809457' display_name='170, Kornatka, gmina
> Dobczyce, powiat myślenicki, województwo małopolskie, 32-410, Polska'
> class='place' type='house' importance='0.511'/></searchresults>
>

odpowiem sam sobie:

sLat = 
xmlDoc.SelectSingleNode("//searchresults/place").Attributes.getNamedItem("lat").Text


I coś mi się chyba z kodowaniem w czytniku podziało ???

-- 
Pozdrowienia
BraZby
www.faq.accdb.pl/
www.acc97.accdb.pl/
Technical Details
Message-ID: <mtn3mt$ank$1@node1.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
References: <691d6e45-8243-484f-88a9-2bafd0f8c402@googlegroups.com> <mthbdl$efd$1@node1.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From: Zbigniew Bratko <access@beztegoaccdb.pl>
Newsgroups: pl.comp.bazy-danych.msaccess
Subject: Re: Google Maps i VBA Access- pobieranie
 koordynatów - wyświetlanie mapy w
 formularzu - kod, który kiedyś działał
Date: Sun, 20 Sep 2015 22:07:39 +0200
Organization: ATMAN - ATM S.A.
Lines: 46
Message-ID: <mtn3mt$ank$1@node1.news.atman.pl>
References: <691d6e45-8243-484f-88a9-2bafd0f8c402@googlegroups.com> <mthbdl$efd$1@node1.news.atman.pl>
NNTP-Posting-Host: 5.172.232.76
Mime-Version: 1.0
X-Trace: node1.news.atman.pl 1442779677 10996 5.172.232.76 (20 Sep 2015 20:07:57 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Sun, 20 Sep 2015 20:07:57 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0
In-Reply-To: <mthbdl$efd$1@node1.news.atman.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit