[BangPypers] parsing xml

Kenneth Gonsalves lawgon at gmail.com
Thu Jul 28 11:48:31 CEST 2011


hi,

here is a simplified version of an xml file:

<?xml version="1.0" encoding="UTF-8"?>
    <gpx >
        <metadata>
                <author>
                <name>CloudMade</name>
                <email id="support" domain="cloudmade.com" />
                <link href="http://maps.cloudmade.com"></link>
                </author>
                <copyright author="CloudMade">
                <license>http://cloudmade.com/faq#license</license>
                </copyright>
                <time>2011-07-28T07:04:01</time>
        </metadata>
            <extensions>
                <distance>1489</distance>
                <time>344</time>
                <start>Sägerstraße</start>
                <end>Im Gisinger Feld</end>
            </extensions>
    </gpx>

I want to get the value of the distance element - 1489. What is the
simplest way of doing this?
-- 
regards
Kenneth Gonsalves



More information about the BangPypers mailing list