Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.048 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'tutorial': 0.03; 'schema': 0.05; 'xml,': 0.05; 'elements.': 0.07; 'hierarchical': 0.09; 'parsing': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'project,': 0.12; 'wrote': 0.14; 'exist;': 0.16; 'finney': 0.16; 'googling': 0.16; 'rarely': 0.16; 'relevant.': 0.16; 'subject:Programming': 0.16; 'subject:XML': 0.16; 'url:guide': 0.16; 'url:standards': 0.16; 'language': 0.16; 'wrote:': 0.18; 'module': 0.19; 'first.': 0.19; 'programming': 0.22; 'comfortable': 0.22; 'cc:addr:python.org': 0.22; '31,': 0.24; 'format,': 0.24; 'parse': 0.24; 'url:02': 0.24; 'fine': 0.24; 'cc:2**0': 0.24; '>': 0.26; 'suggested': 0.26; 'task': 0.26; 'tutorials': 0.26; 'post': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'xml': 0.29; 'document.': 0.30; 'then.': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'getting': 0.31; 'helpful.': 0.31; 'markup': 0.31; 'python"': 0.31; 'url:category': 0.31; 'writes:': 0.31; 'file': 0.32; 'worked': 0.33; 'url:python': 0.33; 'used,': 0.33; 'sense': 0.34; 'problem': 0.35; 'basic': 0.35; 'received:209.85': 0.35; 'created': 0.35; 'possible.': 0.35; 'beyond': 0.35; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'there': 0.35; 'really': 0.36; 'choosing': 0.36; 'programming,': 0.36; 'done': 0.36; 'url:listinfo': 0.36; 'useful': 0.36; 'url:org': 0.36; 'should': 0.36; 'behind': 0.37; 'subject:New': 0.37; 'received:209': 0.37; 'clear': 0.37; 'starting': 0.37; 'being': 0.38; 'sometimes': 0.38; 'skip:& 10': 0.38; 'ben': 0.38; 'whatever': 0.38; 'pm,': 0.38; 'recent': 0.39; 'expect': 0.39; 'does': 0.39; 'though,': 0.39; 'enough': 0.39; 'url:mail': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'read': 0.60; 'consists': 0.60; 'new': 0.61; "you'll": 0.62; 'myself': 0.63; 'more': 0.64; 'skip:\xe2 10': 0.65; 'teach': 0.65; 'here': 0.66; 'between': 0.67; 'mar': 0.68; 'skill': 0.68; 'sound': 0.68; 'results': 0.69; 'hoping': 0.75; '\xe2\x80\x93': 0.77; '8bit%:46': 0.78; '2015': 0.84; 'computers.': 0.84; 'experiment': 0.84; 'noise': 0.84; 'principles.': 0.84; 'standards,': 0.84; 'tasked': 0.84; 'terrible': 0.84; 'url:2014': 0.84; 'simple!': 0.91; 'url:core': 0.91; 'yours.': 0.93 X-AuditID: 12074423-f79536d000000e74-e4-551b73978af8 X-Received: by 10.107.162.74 with SMTP id l71mr60884847ioe.77.1427862420830; Tue, 31 Mar 2015 21:27:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <85384k32yi.fsf@benfinney.id.au> References: <85384k32yi.fsf@benfinney.id.au> From: Andrew Farrell Date: Tue, 31 Mar 2015 23:26:30 -0500 Subject: Re: New to Programming - XML Processing To: Ben Finney Cc: "python-list@python.org" Content-Type: multipart/alternative; boundary=001a1140ca3861c2500512a220b6 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrAKsWRmVeSWpSXmKPExsUixG6nrju9WDrUYP1kI4sjrddYHRg9Xsx/ wxbAGMVlk5Kak1mWWqRvl8CVce71WcaCu/YVv04/YGxg/GfSxcjJISFgIvH+6S5WCFtM4sK9 9WxdjFwcQgKLmSTenXrCAuGcZZRYff8KI4TziEnieetrZgingVGidVETC0R/icSNh8vYQGxe AUGJkzOfgMWFBDwl2v8tB7M5BXQlZp5cxw4Rj5S4d/kDWD2bgIbErZ8PgTZwcLAIqEqcmhEM MSZA4u/9R2CtwgIGEute/WUCsUUEtCVO3+1kBLGZBUwlrt9cywRhe0ncPP6YZQKj0CwkV8xC kpoFtIFZQF1i/TwhiLC2xLKFr5khbDWJ29uusiOLL2BkW8Uom5JbpZubmJlTnJqsW5ycmJeX WqRrppebWaKXmlK6iREcDS7KOxj/HFQ6xCjAwajEw9sQJR0qxJpYVlyZe4hRkoNJSZQ3vgAo xJeUn1KZkVicEV9UmpNafIhRgoNZSYR3+xGpUCHelMTKqtSifJiUNAeLkjjvph98IUIC6Ykl qdmpqQWpRTBZGQ4OJQneT4VAQwWLUtNTK9Iyc0oQ0kwcnCDDeYCGlxUB1fAWFyTmFmemQ+RP MRpzdBz/tYiJY93VhsVMQix5+XmpUuK8k0BKBUBKM0rz4KbBEtorRnGg54R5K0GqeIDJEG7e K6BVTECrTq8SB1lVkoiQkmpgbOu98Kh5Vm5V0EpD6XADEeUOneh+P0f2UNmnmn47dq461Fyj f//2atNZW+c6T15SE9YcxPVp1WRmi/m7FQ3275933GRegP/zwmvuX5J2L11m+q8pxtDNwz5t Dof3xSfLPzhNFjiyOHdJyOmwrpUTPzXrZNl8mb2ktCbbQaQxVuJ/+63k6IMPlFiKMxINtZiL ihMBS2v3nEMDAAA= X-Mailman-Approved-At: Wed, 01 Apr 2015 07:08:14 +0200 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 183 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1427864895 news.xs4all.nl 2892 [2001:888:2000:d::a6]:59364 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88416 --001a1140ca3861c2500512a220b6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > I am new to programming, though not new to computers. One quick tip: when starting a new project, it is sometimes is useful to see if others have done the same thing and use their approach to guide yours. In your case, googling "Garmin Forerunner xml python" results in this blog post which is recent enough that it should be helpful. http://www.nezirteke.com/2014/02/using-python-to-plot-garmin-forerunner.htm= l Note that coming up with good phrases for google to help you with a programming task is a skill that you get better at with time. Welcome to Python! ^-^ On Tue, Mar 31, 2015 at 11:08 PM, Ben Finney wrote: > catperson writes: > > > I am new to programming, though not new to computers. I'm looking to > > teach myself Python 3 and am working my way through a tutorial. > > Congratulations! Python 3 is a fine language to be your first. > > Which tutorial are you following? It may be relevant. > > > At the point I'm at in the tutorial I am tasked with parsing out an > > XML file created with a Garmin Forerunner and am just having a > > terrible time getting my head around the concepts. > > Have you worked with manipulating XML documents in the past? > > If I describe XML as a machine-readable hierarchical data serialisation > format, does that sound like noise or are you comfortable that you > understand that description? > > > What I'm looking for is some suggested reading that might give me some > > of the theory of operation behind ElementTree and then how to parse > > out specific elements. > > You'll need to understand the principles behind XML, then. Warning: it > is not simple! XML is machine-readable, but rarely pleasant for *humans* > to read or understand. > > > I'm hoping with enough reading I can experiment and work my way > > through the problem and end up with a hopefully clear understanding of > > the ElementTree module and Dictionairies. > > XML is a standard =E2=80=93 a large number of standards, really =E2=80=93= from the W3 > Consortium. They have a good overview of the =E2=80=9Ccore=E2=80=9D of XM= L > . > > There are countless XML formats though; XML is a markup language to use > as a basis for constructing data serialisation formats. You need to know > what the specific format (called a =E2=80=9Cschema=E2=80=9D) is before yo= u can expect to > make sense of it, and so in order to understand what's in the document > you need a description of the specific schema from whoever wrote the > document. > > General XML tutorials do exist; here is one comprehensive one > . You'll likely want to > learn more about the specifics of whatever XML format is being used, > though, before going much beyond the basic principles. > > -- > \ =E2=80=9CPolitics is not the art of the possible. It consis= ts in | > `\ choosing between the disastrous and the unpalatable.=E2=80=9D = =E2=80=94John | > _o__) Kenneth Galbraith, 1962-03-02 | > Ben Finney > > -- > https://mail.python.org/mailman/listinfo/python-list > --001a1140ca3861c2500512a220b6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> I am new to programming, though not new to computers.
=
One quick tip: when starting a new project, it is sometimes is useful t= o see if others have done the same thing and use their approach to guide yo= urs. In your case, googling "Garmin Forerunner xml python" result= s in this blog post which is recent enough that it should be helpful.

Note that coming up wit= h good phrases for google to help you with a programming task is a skill th= at you get better at with time.

Welcome to Python!= ^-^

O= n Tue, Mar 31, 2015 at 11:08 PM, Ben Finney <ben+python@benfinn= ey.id.au> wrote:
catperson <me@anonymous.invalid> writes:

> I am new to programming, though not new to computers. I'm looking = to
> teach myself Python 3 and am working my way through a tutorial.

Congratulations! Python 3 is a fine language to be your first.

Which tutorial are you following? It may be relevant.

> At the point I'm at in the tutorial I am tasked with parsing out a= n
> XML file created with a Garmin Forerunner and am just having a
> terrible time getting my head around the concepts.

Have you worked with manipulating XML documents in the past?

If I describe XML as a machine-readable hierarchical data serialisation
format, does that sound like noise or are you comfortable that you
understand that description?

> What I'm looking for is some suggested reading that might give me = some
> of the theory of operation behind ElementTree and then how to parse > out specific elements.

You'll need to understand the principles behind XML, then. Warni= ng: it
is not simple! XML is machine-readable, but rarely pleasant for *humans* to read or understand.

> I'm hoping with enough reading I can experiment and work my way > through the problem and end up with a hopefully clear understanding of=
> the ElementTree module and Dictionairies.

XML is a standard =E2=80=93 a large number of standards, really =E2= =80=93 from the W3
Consortium. They have a good overview of the =E2=80=9Ccore=E2=80=9D of XML<= br> <URL:= http://www.w3.org/standards/xml/core>.

There are countless XML formats though; XML is a markup language to use
as a basis for constructing data serialisation formats. You need to know what the specific format (called a =E2=80=9Cschema=E2=80=9D) is before you = can expect to
make sense of it, and so in order to understand what's in the document<= br> you need a description of the specific schema from whoever wrote the
document.

General XML tutorials do exist; here is one comprehensive one
<URL:http://www.xmlobjective.com/category/guide/>. You'll like= ly want to
learn more about the specifics of whatever XML format is being used,
though, before going much beyond the basic principles.

--
=C2=A0\=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=80=9CPolitics is not t= he art of the possible. It consists in |
=C2=A0 `\=C2=A0 =C2=A0 =C2=A0 =C2=A0choosing between the disastrous and the= unpalatable.=E2=80=9D =E2=80=94John |
_o__)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Kenneth Galbraith, = 1962-03-02 |
Ben Finney

--
https://mail.python.org/mailman/listinfo/python-list

--001a1140ca3861c2500512a220b6--