Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88415
| 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 | <amfarrell@mit.edu> |
| 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 | <upomhad4fj6sulnr5so8088fdqpo0nk6mu@4ax.com> <0b0fd795-8f3e-443e-acc2-aed9b5d200ba@googlegroups.com> |
| From | Andrew Farrell <amfarrell@mit.edu> |
| Date | Tue, 31 Mar 2015 23:27:57 -0500 |
| Subject | Re: New to Programming - XML Processing |
| To | Rustom Mody <rustompmody@gmail.com> |
| Cc | "python-list@python.org" <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 <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.6.1427864895.12925.python-list@python.org> (permalink) |
| 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 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
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 <rustompmody@gmail.com> 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 <Activity Sport="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)¹ 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 > ----------- > ¹ At the least because environments like Idle are more conducive to such > playing > -- > https://mail.python.org/mailman/listinfo/python-list >
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
New to Programming - XML Processing catperson <me@anonymous.invalid> - 2015-03-31 20:27 -0700
Re: New to Programming - XML Processing Ben Finney <ben+python@benfinney.id.au> - 2015-04-01 15:08 +1100
Re: New to Programming - XML Processing Rustom Mody <rustompmody@gmail.com> - 2015-03-31 21:17 -0700
Re: New to Programming - XML Processing Andrew Farrell <amfarrell@mit.edu> - 2015-03-31 23:27 -0500
Re: New to Programming - XML Processing Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-04-01 09:00 +0100
Re: New to Programming - XML Processing catperson <me@anonymous.invalid> - 2015-04-01 15:33 -0700
Re: New to Programming - XML Processing sohcahtoa82@gmail.com - 2015-04-01 17:46 -0700
Re: New to Programming - XML Processing Rustom Mody <rustompmody@gmail.com> - 2015-03-31 21:49 -0700
Re: New to Programming - XML Processing Andrew Farrell <amfarrell@mit.edu> - 2015-03-31 23:26 -0500
Re: New to Programming - XML Processing Burak Arslan <burak.arslan@arskom.com.tr> - 2015-04-01 16:44 +0300
csiph-web