0
das ist mein Eingang:
mit Python 2,4Fangen Info mit xml.dom.minidom
<?xml version="1.0" encoding="UTF-8" ?>
<Status>
<_IGPS>
<Lat>03°14'48"N</Lat>
<Lon>117°35'03"E</Lon>
<Type>3D</Type>
<Status>allowed</Status>
<Time>17/01/25,09:12:02</Time>
</_IGPS>
und im Versuch, nur die Lat und Melden Sie sich von diesem zu nehmen.
dies ist der Code, den ich verwenden:
doc = minidom.parse("t.xml")
temp = doc.getElementsByTagName("_IGPS")
if i print this i get => "<xml.dom.minidom.Document instance at 0x02C01E68>"
*** This is the part that i cant figure out to extract the actualy values ***
auch bei somepoint, wenn ich versuche, Folgendes zu tun: als
print(temp.** at this point the interpeter does not know what is the type of temp**
i verwendet diese Website als Referenz, was zu tun:
https://www.mkyong.com/python/python-read-xml-file-dom-example/
Vielen Dank. –
Wenn die Antwort richtig ist, bitte als korrekt markieren, Danke. –