Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #60464

Re: parsing nested unbounded XML fields with ElementTree

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.103
X-Spam-Level *
X-Spam-Evidence '*H*': 0.79; '*S*': 0.00; 'xml,': 0.05; 'string': 0.09; 'subject:fields': 0.09; 'subject:parsing': 0.09; 'archives,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'maliciously': 0.16; 'nesting': 0.16; 'preserve': 0.16; 'quoted': 0.16; 'subject:XML': 0.16; 'tags.': 0.16; 'email addr:python.org,': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'later': 0.20; 'not,': 0.20; 'parse': 0.24; 'initial': 0.24; 'people,': 0.24; "i've": 0.25; 'posts': 0.26; 'post': 0.26; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'specifically': 0.29; 'chris': 0.29; 'am,': 0.29; 'generally': 0.29; 'thus': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'went': 0.31; 'software,': 0.31; 'too.': 0.31; '(since': 0.31; '25,': 0.31; 'larry': 0.31; 'quite': 0.32; 'text': 0.33; 'monday,': 0.33; 'subject:with': 0.35; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'there': 0.35; 'really': 0.36; 'replies': 0.36; "didn't": 0.36; 'thanks': 0.36; 'list': 0.37; 'being': 0.38; 'nov': 0.38; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'mailing': 0.39; 'users': 0.40; 'even': 0.60; 'read': 0.60; 'easy': 0.60; 'problems.': 0.60; 'information,': 0.61; 'first': 0.61; "you'll": 0.62; 'show': 0.63; 'more': 0.64; 'email name:python-list': 0.65; 'news': 0.67; '26,': 0.68; 'subject': 0.69; 'groups.': 0.74; 'saw': 0.77; '9:45': 0.84; 'deja': 0.84; 'off,': 0.84; 'unaware': 0.84; 'carries': 0.91; 'good,': 0.91; 'on?': 0.91; 'fight': 0.97; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+ycgMAaatahtyy1TmCkHtxZ7nOcA7pQOOk+mT/ka/2k=; b=TWR4yAQyXbUqAjZXlvv/qdBFhff5c+i4GTiT/o2dQfL8y+C42lC+Vx2aVjjZ7oc8/m A6VJg4/FnMBQta7VnfYw7XMJtkf7E4EJODcngxxnAMSnoOJjEApczAV81t6fh7kL2gwG 1w8rVQLTAwrkwvNQLqnejJaC5bsvfMgE5X8Q6OIlmrtQCRwKePbIRRwB38homQBIyTkY Oa5JIJgO9459XKfzvIFLWKMY8/QWbS4zU2XxuUN38vfX+fb4Mutdjey6Lt7YZgcmgUk/ afJ10NdSVeRCBkINa8ZNXEiPkaT7FtnreVsaDKQRnRRHhv28r0qsA0999CQ1irj5UTrx rf9w==
MIME-Version 1.0
X-Received by 10.68.130.130 with SMTP id oe2mr5342707pbb.135.1385421586387; Mon, 25 Nov 2013 15:19:46 -0800 (PST)
In-Reply-To <CACwCsY7iXJ_1OB2yzMTrP0i60skoBk9smwYuDd6LVpMO+ozbGg@mail.gmail.com>
References <CACwCsY7iXJ_1OB2yzMTrP0i60skoBk9smwYuDd6LVpMO+ozbGg@mail.gmail.com>
Date Tue, 26 Nov 2013 10:19:46 +1100
Subject Re: parsing nested unbounded XML fields with ElementTree
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.3202.1385421595.18130.python-list@python.org> (permalink)
Lines 37
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1385421595 news.xs4all.nl 15911 [2001:888:2000:d::a6]:37638
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:60464

Show key headers only | View raw


On Tue, Nov 26, 2013 at 9:45 AM, Larry Martell <larry.martell@gmail.com> wrote:
> On Monday, November 25, 2013 5:30:44 PM UTC-5, Chris Angelico wrote:
>
>> First off, please clarify: Are there five corresponding </Node> tags
>> later on? If not, it's not XML, and nesting will have to be defined
>> some other way.
>
> Yes, there are corresponding </Node> tags. I just didn't show them.

Good good, I just saw the "unbounded" in your subject line and got
worried :) I'm pretty sure there's a way to parse that will preserve
the current nesting information, but others can describe that better
than I can.

>> Secondly, please get off Google Groups. Your initial post is
>> malformed, and unless you specifically fight the software, your
>> replies will be even more malformed, to the point of being quite
>> annoying. There are many other ways to read a newsgroup, or you can
>> subscribe to the mailing list python-list@python.org, which carries
>> the same content.
>
> Not sure what you mean by malformed. I don't really care for Google Groups,
> but I've been using it to post to this any other groups for years (since rn
> and deja news went away) and no one ever said my posts were malformed. In
> any case, I did not know the group was available as a ML. I've subbed to
> that and will post that way.

The mailing list works well for me too. Google Groups is deceptively
easy for a lot of people, but if you look through the list's archives,
you'll see that the posts it makes are unwrapped (and thus string out
to the right an arbitrary length), and all quoted text is
double-spaced, among other problems. Its users are generally unaware
of this, and like you are not maliciously inflicting that on us all,
but that doesn't make it any less painful to read :) Thanks for
switching.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: parsing nested unbounded XML fields with ElementTree Chris Angelico <rosuav@gmail.com> - 2013-11-26 10:19 +1100

csiph-web