Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.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.041 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'xml,': 0.05; 'string': 0.09; 'skip:0 70': 0.09; 'subject:fields': 0.09; 'subject:parsing': 0.09; 'received:localhost.localdomain': 0.10; 'received:localdomain': 0.11; 'cc:addr:python-list': 0.11; '>>': 0.16; 'archives,': 0.16; 'maliciously': 0.16; 'nesting': 0.16; 'preserve': 0.16; 'quoted': 0.16; 'spacing': 0.16; 'subject:XML': 0.16; 'tags.': 0.16; 'text?': 0.16; 'email addr:python.org,': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'typing': 0.19; 'later': 0.20; 'not,': 0.20; 'seems': 0.21; '>>>': 0.22; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'parse': 0.24; 'skip:l 30': 0.24; 'sorry,': 0.24; 'text,': 0.24; 'initial': 0.24; 'mon,': 0.24; 'people,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; '>': 0.26; 'posts': 0.26; 'this:': 0.26; 'post': 0.26; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'specifically': 0.29; 'fixed': 0.29; 'chris': 0.29; 'am,': 0.29; 'generally': 0.29; 'quickly': 0.29; 'thus': 0.29; 'xml': 0.29; "doesn't": 0.30; "i'm": 0.30; 'went': 0.31; 'software,': 0.31; 'too.': 0.31; '(since': 0.31; '25,': 0.31; '>>>>': 0.31; 'larry': 0.31; 'file': 0.32; 'skip:m 30': 0.32; 'quite': 0.32; 'text': 0.33; 'monday,': 0.33; 'plain': 0.33; 'noticed': 0.34; 'could': 0.34; 'subject:with': 0.35; 'case,': 0.35; 'but': 0.35; 'google': 0.35; 'there': 0.35; 'really': 0.36; 'replies': 0.36; "didn't": 0.36; 'thanks': 0.36; 'too': 0.37; 'list': 0.37; 'being': 0.38; 'skip:& 10': 0.38; 'gmail': 0.38; 'nov': 0.38; 'pm,': 0.38; 'skip:& 20': 0.39; 'realize': 0.39; 'sure': 0.39; 'mailing': 0.39; 'users': 0.40; 'how': 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; 'term': 0.63; 'more': 0.64; 'email name:python-list': 0.65; 'to:addr:gmail.com': 0.65; 'news': 0.67; '26,': 0.68; 'attention.': 0.68; 'subject': 0.69; 'groups.': 0.74; 'saw': 0.77; '(probably': 0.84; '9:45': 0.84; 'deja': 0.84; 'female': 0.84; 'male': 0.84; 'off,': 0.84; 'replied.': 0.84; 'unaware': 0.84; 'carries': 0.91; 'good,': 0.91; 'on?': 0.91; 'fight': 0.97; '2013': 0.98 X-Originating-IP: [82.18.78.222] X-Spam: 0 X-Authority: v=2.1 cv=HNhNF+dv c=1 sm=1 tr=0 a=BQQYMKY95uUcsUZhHvNSQw==:117 a=BQQYMKY95uUcsUZhHvNSQw==:17 a=qp3vAZpzyfkA:10 a=iO56Jl3UpFMA:10 a=uObrxnre4hsA:10 a=IkcTkHD0fZMA:10 a=NLZqzBF-AAAA:8 a=Ei1KkMBNqycA:10 a=pGLkceISAAAA:8 a=8AHkEIZyAAAA:8 a=crK-yxB1ZGnI7ZCj0aYA:9 a=C0pmfRc8ra4n0prZ:21 a=1Si3jutFRoCYLpdp:21 a=rg9uJGe9NE5UE4hh:21 a=QEXdDO2ut3YA:10 a=tXsnliwV7b4A:10 a=_dQi-Dcv4p4A:10 a=MSl-tDqOz04A:10 a=VhVvL8HfBcoA:10 a=NWVoK91CQyQA:10 Date: Tue, 26 Nov 2013 12:57:05 +0000 From: alister User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Larry Martell Subject: Re: parsing nested unbounded XML fields with ElementTree References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 140 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1385470703 news.xs4all.nl 15998 [2001:888:2000:d::a6]:59967 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:60510 On 26/11/13 11:59, Larry Martell wrote: > On Tue, Nov 26, 2013 at 5:41 AM, Alister wrote: >> On Mon, 25 Nov 2013 18:25:55 -0500, Larry Martell wrote: >> >>> On Mon, Nov 25, 2013 at 6:19 PM, Chris Angelico >>> wrote: >>> >>>> On Tue, Nov 26, 2013 at 9:45 AM, Larry Martell >>>> >>>> wrote: >>>>> On Monday, November 25, 2013 5:30:44 PM UTC-5, Chris Angelico wrote: >>>>> >>>>>> First off, please clarify: Are there five corresponding tags >>>>>> later on? If not, it's not XML, and nesting will have to be defined >>>>>> some other way. >>>>> Yes, there are corresponding 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. >>>> >>>> >>> The term 'unbounded' is used in the XML xsd file like this: >>> >>> >>> >>> >>>>>> 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. >>>> >>>> >>> I had noticed the double spacing and I always fixed that when I replied. >>>
On Mon, Nov 25, 2013 at 6:19 PM, Chris Angelico >> dir="ltr"><>> target="_blank">rosuav@gmail.com> wrote:
>> class="gmail_extra">
>>>
>> class="im">On Tue, Nov 26, 2013 at 9:45 AM, Larry Martell <>> href="mailto:larry.martell@gmail.com">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.

The term >>> 'unbounded' is used in the XML xsd file like >>> this:

<xs:sequence >>> maxOccurs="unbounded">

>> class="gmail_quote" style="margin:0px 0px 0px >>> 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border- >> left-style:solid;padding-left:1ex"> >>>

>>> >> 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 >> href="mailto:python-list@python.org">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.
>> color="#888888">

I had >>> noticed the double spacing and I always fixed that when I replied. >>>

>> >> if you could now change your male client > > What about my female client? > >> to send in plane text > How about plain text? > >> only we >> would not get this duplicated HTML copy of the post which is just as >> annoying as the double spacing form GG (probably more so). > Sorry, didn't realize it was sending in HMTL. I had it set to plain > text, but when the awful gmail update came out it seems to have > reverted to HTML. Hopefully this is better. sorry, Typing too quickly without paying attention.