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


Groups > comp.lang.python > #60497 > unrolled thread

Re: parsing nested unbounded XML fields with ElementTree

Started byAlister <alister.ware@ntlworld.com>
First post2013-11-26 10:41 +0000
Last post2013-11-26 12:57 +0000
Articles 4 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  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

#60497 — Re: parsing nested unbounded XML fields with ElementTree

FromAlister <alister.ware@ntlworld.com>
Date2013-11-26 10:41 +0000
SubjectRe: parsing nested unbounded XML fields with ElementTree
Message-ID<eV_ku.19$6b4.10@fx26.am4>
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 to send in plane 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).


-- 
<KnaraKat> Bite me.
* TheOne gets some salt, then proceeds to nibble on KnaraKat a little
         bit....

[toc] | [next] | [standalone]


#60503

FromLarry Martell <larry.martell@gmail.com>
Date2013-11-26 06:59 -0500
Message-ID<mailman.3229.1385467194.18130.python-list@python.org>
In reply to#60497
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.

[toc] | [prev] | [next] | [standalone]


#60505

FromChris Angelico <rosuav@gmail.com>
Date2013-11-26 23:20 +1100
Message-ID<mailman.3231.1385468421.18130.python-list@python.org>
In reply to#60497
On Tue, Nov 26, 2013 at 10:59 PM, Larry Martell <larry.martell@gmail.com> wrote:
> 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.

Yeah, I have the same trouble... but yes, this post looks fine to me.
(Do consider trimming quoted text, though.) It's text with no HTML
component.

ChrisA

[toc] | [prev] | [next] | [standalone]


#60510

Fromalister <alister.ware@ntlworld.com>
Date2013-11-26 12:57 +0000
Message-ID<mailman.3236.1385470703.18130.python-list@python.org>
In reply to#60497
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.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web