Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'tutorial': 0.03; '(at': 0.04; '-----------': 0.05; 'interpreter': 0.05; 'elements.': 0.07; 'environments': 0.07; 'expressions': 0.07; 'wednesday,': 0.07; 'attributes': 0.09; 'parsing': 0.09; 'suggestions:': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '(without': 0.16; 'assigned,': 0.16; 'blindly': 0.16; 'bugs.': 0.16; 'losing': 0.16; 'subject:Programming': 0.16; 'subject:XML': 0.16; 'elements': 0.16; 'wrote:': 0.18; 'module': 0.19; 'advance.': 0.19; 'examples': 0.20; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; '31,': 0.24; 'parse': 0.24; '(or': 0.24; 'cc:2**0': 0.24; '>': 0.26; 'suggested': 0.26; 'post': 0.26; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'xml': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'getting': 0.31; 'trivial': 0.31; 'file': 0.32; 'run': 0.32; 'url:python': 0.33; 'problem': 0.35; 'advice': 0.35; 'received:209.85': 0.35; 'created': 0.35; 'skip:s 30': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'idle': 0.36; 'programming,': 0.36; 'url:listinfo': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'should': 0.36; 'behind': 0.37; 'subject:New': 0.37; 'received:209': 0.37; 'clear': 0.37; 'files': 0.38; 'pm,': 0.38; 'enough': 0.39; 'url:mail': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'most': 0.60; 'new': 0.61; 'such': 0.63; 'myself': 0.63; 'more': 0.64; 'levels': 0.65; 'linked': 0.65; 'teach': 0.65; 'to:addr:gmail.com': 0.65; 'dont': 0.67; 'mar': 0.68; 'risk': 0.72; 'hoping': 0.75; '2015': 0.84; 'complexity': 0.84; 'computers.': 0.84; 'conducive': 0.84; 'experiment': 0.84; 'tasked': 0.84; 'terrible': 0.84 X-AuditID: 1209190c-f792b6d000000d1f-06-551b73edfccf X-Received: by 10.50.138.68 with SMTP id qo4mr9189603igb.33.1427862507882; Tue, 31 Mar 2015 21:28:27 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <0b0fd795-8f3e-443e-acc2-aed9b5d200ba@googlegroups.com> References: <0b0fd795-8f3e-443e-acc2-aed9b5d200ba@googlegroups.com> From: Andrew Farrell Date: Tue, 31 Mar 2015 23:27:57 -0500 Subject: Re: New to Programming - XML Processing To: Rustom Mody Cc: "python-list@python.org" Content-Type: multipart/alternative; boundary=001a1134bd809215970512a225a7 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHKsWRmVeSWpSXmKPExsUixG6nrvu2WDrU4MB3S4sjrddYHRg9Xsx/ wxbAGMVlk5Kak1mWWqRvl8CVsejnBtaCD+oVT6YvZGpg7FPsYuTgkBAwkWh9VtbFyAlkiklc uLeeDcQWEljMJHHuYwiEfZZR4veF5C5GLiD7EZPEo/t32SCcJkaJN1sPsUN0F0l87TrEBGLz CghKnJz5hAWi21Ni4rWLYFM5BVwkJs3dALWhQGJL1xywejYBDYlbPx8ygtgsAqoSl3e/Y4SY EyDRd3kl2BxhAQOJda/+gtWLCKhLvGg4xgpiMwuYSly/uZYJwvaSWDx7KfMERqFZSM6YhSQ1 C+hnZqD29fOEIMLaEssWvmaGsNUkbm+7yo4svoCRbRWjbEpulW5uYmZOcWqybnFyYl5eapGu oV5uZoleakrpJkZQJHBK8uxgfHNQ6RCjAAejEg9vQ5R0qBBrYllxZe4hRkkOJiVR3vgCoBBf Un5KZUZicUZ8UWlOavEhRgkOZiUR3u1HpEKFeFMSK6tSi/JhUtIcLErivJt+8IUICaQnlqRm p6YWpBbBZGU4OJQkeG8XAQ0VLEpNT61Iy8wpQUgzcXCCDOcBGr4ZpIa3uCAxtzgzHSJ/itGY o+P4r0VMHOuuNixmEmLJy89LlRLnDQIpFQApzSjNg5sGS2avGMWBnhPmPQJSxQNMhHDzXgGt YgJadXqVOMiqkkSElFQD46aLWcrdns97zu9+b8q4/GLmE+1l7POXzap5dyxXdrfQqrs7zv+S 2N94ZELXu19LTXrE/7T8jJ3Uc6toUa83z9ee8xwnKwOTtrS1Pf3Uf+bxNd1ZgQlW3Jvr0xt3 fJ3f0uCWY+5wIMb74A1R3T/5QsqpOw6aJPXE+K1/e/hTv/Cts3OYeGZbeSuxFGckGmoxFxUn AgBH6hJ+QQMAAA== 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: 113 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1427864895 news.xs4all.nl 2891 [2001:888:2000:d::a6]:59361 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88415 --001a1134bd809215970512a225a7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable You should follow Rustom's advice before just diving into the blog post I linked to. Otherwise you risk blindly following things and losing your bearings when you run into bugs. On Tue, Mar 31, 2015 at 11:17 PM, Rustom Mody wrote= : > On Wednesday, April 1, 2015 at 8:57:15 AM UTC+5:30, catperson wrote: > > 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. 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. 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. Most of what I have been able to find in examples that I > > can understand use very simplistic XML files and this Garmin file is > > many levels of sub-elements and some of those elements have attributes > > assigned, like . > > > > 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. > > > > Thanks for any suggestions in advance. > > Suggestions: > 1. Learn to use the interpreter interactively; ie (at the least)=C2=B9 ie > > a. Start up python (without a program) > b. Play around with trivial expressions > c. Explore introspective features - help(), type() dir() > > 2. Do you know about triple-quoted strings? > a. Start small (or trivial) sub-parts of your XML as triple-quoted > examples in the > interpreter and start throwing them at elementtree > b. If they dont work trivialize further; if they work add complexity > ----------- > =C2=B9 At the least because environments like Idle are more conducive to = such > playing > -- > https://mail.python.org/mailman/listinfo/python-list > --001a1134bd809215970512a225a7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
You should follow Rustom's advice before just diving i= nto the blog post I linked to. Otherwise you risk blindly following things = and losing your bearings when you run into bugs.

On Tue, Mar 31, 2015 at 11:17 PM, Rust= om Mody <rustompmody@gmail.com> wrote:
On Wednesday, Apri= l 1, 2015 at 8:57:15 AM UTC+5:30, catperson wrote:
> I am new to programming, though not new to computers.=C2=A0 I'm lo= oking to
> teach myself Python 3 and am working my way through a tutorial.=C2=A0 = At
> the point I'm at in the tutorial I am tasked with parsing out an X= ML
> file created with a Garmin Forerunner and am just having a terrible > time getting my head around the concepts.=C2=A0 What I'm looking f= or is
> some suggested reading that might give me some of the theory of
> operation behind ElementTree and then how to parse out specific
> elements.=C2=A0 Most of what I have been able to find in examples that= I
> can understand use very simplistic XML files and this Garmin file is > many levels of sub-elements and some of those elements have attributes=
> assigned, like <Activity Sport=3D"Running">.
>
> 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.
>
> Thanks for any suggestions in advance.

Suggestions:
1. Learn to use the interpreter interactively; ie (at the least)=C2=B9 ie
a. Start up python (without a program)
b. Play around with trivial expressions
c. Explore introspective features - help(), type() dir()

2. Do you know about triple-quoted strings?
a. Start small (or trivial) sub-parts of your XML as triple-quoted examples= in the
interpreter and start throwing them at elementtree
b. If they dont work trivialize further; if they work add complexity
-----------
=C2=B9 At the least because environments like Idle are more conducive to su= ch playing
--
https://mail.python.org/mailman/listinfo/python-list

--001a1134bd809215970512a225a7--