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


Groups > comp.lang.python > #60510

Re: parsing nested unbounded XML fields with ElementTree

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 <alister.ware@ntlworld.com>
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; '&gt;&gt;': 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&gt;': 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; '&gt;': 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 <alister.ware@ntlworld.com>
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 <larry.martell@gmail.com>
Subject Re: parsing nested unbounded XML fields with ElementTree
References <eV_ku.19$6b4.10@fx26.am4> <CACwCsY4SjL5=pPKGFj8pkb-3XVqO9rve6Y36033e9uTAgUmE-g@mail.gmail.com>
In-Reply-To <CACwCsY4SjL5=pPKGFj8pkb-3XVqO9rve6Y36033e9uTAgUmE-g@mail.gmail.com>
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 <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.3236.1385470703.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


On 26/11/13 11:59, Larry Martell wrote:
> On Tue, Nov 26, 2013 at 5:41 AM, Alister <alister.ware@ntlworld.com> wrote:
>> On Mon, 25 Nov 2013 18:25:55 -0500, Larry Martell wrote:
>>
>>> On Mon, Nov 25, 2013 at 6:19 PM, Chris Angelico <rosuav@gmail.com>
>>> wrote:
>>>
>>>> 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.
>>>>
>>>>
>>> The term 'unbounded' is used in the XML xsd file like this:
>>>
>>> <xs:sequence maxOccurs="unbounded">
>>>
>>>
>>>>>> 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.
>>> <div dir="ltr">On Mon, Nov 25, 2013 at 6:19 PM, Chris Angelico <span
>>> dir="ltr">&lt;<a href="mailto:rosuav@gmail.com"
>>> target="_blank">rosuav@gmail.com</a>&gt;</span> wrote:<br><div
>>> class="gmail_extra"><div class="gmail_quote">
>>> <blockquote 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"><div
>>> class="im">On Tue, Nov 26, 2013 at 9:45 AM, Larry Martell &lt;<a
>>> href="mailto:larry.martell@gmail.com">larry.martell@gmail.com</a>&gt;
>>> wrote:<br>
>>>
>>> &gt; On Monday, November 25, 2013 5:30:44 PM UTC-5, Chris Angelico
>>> wrote:<br>
>>> &gt;<br>
>>> </div><div class="im">&gt;&gt; First off, please clarify: Are there five
>>> corresponding &lt;/Node&gt; tags<br>
>>> &gt;&gt; later on? If not, it&#39;s not XML, and nesting will have to be
>>> defined<br>
>>> &gt;&gt; some other way.<br>
>>> &gt;<br>
>>> &gt; Yes, there are corresponding &lt;/Node&gt; tags. I just didn&#39;t
>>> show them.<br>
>>> <br>
>>> </div>Good good, I just saw the &quot;unbounded&quot; in your subject
>>> line and got<br>
>>> worried :) I&#39;m pretty sure there&#39;s a way to parse that will
>>> preserve<br>
>>> the current nesting information, but others can describe that better<br>
>>> than I can.<br></blockquote><div><br></div><div>The term
>>> &#39;unbounded&#39; is used in the XML xsd file like
>>> this:</div><div><br></div><div>&lt;xs:sequence
>>> maxOccurs=&quot;unbounded&quot;&gt;<br></div><div><br></div><blockquote
>>> 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">
>>> <div class="im"><br>
>>> &gt;&gt; Secondly, please get off Google Groups. Your initial post
>>> is<br>
>>> &gt;&gt; malformed, and unless you specifically fight the software,
>>> your<br>
>>> &gt;&gt; replies will be even more malformed, to the point of being
>>> quite<br>
>>> &gt;&gt; annoying. There are many other ways to read a newsgroup, or you
>>> can<br>
>>> &gt;&gt; subscribe to the mailing list <a
>>> href="mailto:python-list@python.org">python-list@python.org</a>, which
>>> carries<br>
>>> &gt;&gt; the same content.<br>
>>> &gt;<br>
>>> &gt; Not sure what you mean by malformed. I don&#39;t really care for
>>> Google Groups,<br>
>>> &gt; but I&#39;ve been using it to post to this any other groups for
>>> years (since rn<br>
>>> &gt; and deja news went away) and no one ever said my posts were
>>> malformed. In<br>
>>> &gt; any case, I did not know the group was available as a ML. I&#39;ve
>>> subbed to<br>
>>> &gt; that and will post that way.<br>
>>> <br>
>>> </div>The mailing list works well for me too. Google Groups is
>>> deceptively<br>
>>> easy for a lot of people, but if you look through the list&#39;s
>>> archives,<br>
>>> you&#39;ll see that the posts it makes are unwrapped (and thus string
>>> out<br>
>>> to the right an arbitrary length), and all quoted text is<br>
>>> double-spaced, among other problems. Its users are generally unaware<br>
>>> of this, and like you are not maliciously inflicting that on us all,<br>
>>> but that doesn&#39;t make it any less painful to read :) Thanks for<br>
>>> switching.<br><span class=""><font
>>> color="#888888"><br></font></span></blockquote><div><br></div><div>I had
>>> noticed the double spacing and I always fixed that when I replied.
>>>   </div></div><br></div></div>
>>
>> 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.

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


Thread

Re: parsing nested unbounded XML fields with ElementTree Alister <alister.ware@ntlworld.com> - 2013-11-26 10:41 +0000
  Re: parsing nested unbounded XML fields with ElementTree Larry Martell <larry.martell@gmail.com> - 2013-11-26 06:59 -0500
  Re: parsing nested unbounded XML fields with ElementTree Chris Angelico <rosuav@gmail.com> - 2013-11-26 23:20 +1100
  Re: parsing nested unbounded XML fields with ElementTree alister <alister.ware@ntlworld.com> - 2013-11-26 12:57 +0000

csiph-web