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


Groups > comp.lang.python > #60503

Re: parsing nested unbounded XML fields with ElementTree

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <larry.martell@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.063
X-Spam-Evidence '*H*': 0.87; '*S*': 0.00; 'xml,': 0.05; 'string': 0.09; 'skip:0 70': 0.09; 'subject:fields': 0.09; 'subject:parsing': 0.09; '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; '&lt;': 0.19; 'later': 0.20; 'not,': 0.20; 'seems': 0.21; 'email addr:gmail.com&gt;': 0.22; 'cc:addr:python.org': 0.22; '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; 'thus': 0.29; 'xml': 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; '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; '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; '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; 'news': 0.67; '26,': 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; 'to:addr:ntlworld.com': 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 :cc:content-type; bh=/czj510RGVKS5tvrTtXbYsqbaoRfEhXzznUGvJtqOuI=; b=pplbl0o/Dk3ZecMwsv8D54jtisnDsXeAULKl3YAN/mXM+J6g7GGA95tLN6ik1lcVnd YbHzaV7YgGB37rmL9OXnPo44lOVEjIU0vxQ4P2mXQJy0VT2eCuhbq29o/3C56+DY5x3r MZw+VevphOOPGMxMuiuTBwDgc4QK4vCOltQeifaD6+MBP+F263n4SH+lgOqgGVm/yqRi NCoXJDkbYPYjuZTD5AbmmZM0N/ZWVbJbCC3cEs2mu/jhBUdCWjJ9IDaess3EEeVQfVab s1auIs7Fugtf/u44TGczg3trpACFIdoj7+hDWVifLtvUYbj4RpMrFoOOm981ZwBQh1b3 8lvw==
MIME-Version 1.0
X-Received by 10.181.11.169 with SMTP id ej9mr8964924wid.13.1385467187399; Tue, 26 Nov 2013 03:59:47 -0800 (PST)
In-Reply-To <eV_ku.19$6b4.10@fx26.am4>
References <eV_ku.19$6b4.10@fx26.am4>
Date Tue, 26 Nov 2013 06:59:47 -0500
Subject Re: parsing nested unbounded XML fields with ElementTree
From Larry Martell <larry.martell@gmail.com>
To Alister <alister.ware@ntlworld.com>
Content-Type text/plain; charset=UTF-8
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.3229.1385467194.18130.python-list@python.org> (permalink)
Lines 148
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1385467194 news.xs4all.nl 15975 [2001:888:2000:d::a6]:60849
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:60503

Show key headers only | View raw


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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next 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