Kee Nethery wrote:
> On Jun 25, 2009, at 11:39 PM, Stefan Behnel wrote:
>> parsing a
>> document from a string does not have its own function, because it is
>> trivial to write
>>
>> tree = parse(BytesIO(some_byte_string))
>
> :-) Trivial for someone familiar with the language. For a newbie li
First, thanks to everyone who responded. Figured I'd test all the
suggestions and provide a response to the list. Here goes ...
On Jun 25, 2009, at 7:38 PM, Nobody wrote:
Why do you need an ElementTree rather than an Element? XML(string)
returns
the root element, as if you had used et.parse(
On Jun 25, 11:20 pm, Stefan Behnel wrote:
> Carl Banks wrote:
> > On Jun 25, 10:11 pm, Stefan Behnel wrote:
> >> Carl Banks wrote:
> Why isn't et.parse the only way to do this? Why have XML or fromstring
> at all?
> >>> Because Fredrick Lundh wanted it that way. Unlike most Python
> >
Hi,
Kee Nethery wrote:
> Why isn't et.parse the only way to do this? Why have XML or fromstring
> at all?
Well, use cases. XML() is an alias for fromstring(), because it's
convenient (and well readable) to write
section = XML('A to Z')
section.append(paragraphs)
for XML literals in source
Carl Banks wrote:
> On Jun 25, 10:11 pm, Stefan Behnel wrote:
>> Carl Banks wrote:
Why isn't et.parse the only way to do this? Why have XML or fromstring
at all?
>>> Because Fredrick Lundh wanted it that way. Unlike most Python
>>> libraries ElementTree is under the control of one pers
On Jun 25, 10:11 pm, Stefan Behnel wrote:
> Carl Banks wrote:
> >> Why isn't et.parse the only way to do this? Why have XML or fromstring
> >> at all?
>
> > Because Fredrick Lundh wanted it that way. Unlike most Python
> > libraries ElementTree is under the control of one person, which means
>
Carl Banks wrote:
>> Why isn't et.parse the only way to do this? Why have XML or fromstring
>> at all?
>
> Because Fredrick Lundh wanted it that way. Unlike most Python
> libraries ElementTree is under the control of one person, which means
> it was not designed or vetted by the community, whic
On Jun 25, 8:53 pm, Kee Nethery wrote:
> On Jun 25, 2009, at 8:04 PM, Carl Banks wrote:
> > A few minor
> > things should be no big deal.
>
> True and I will eventually get past the minor quirks. As a newbie,
> figured I'd point out the difficult portions, things that conceptually
> are confus
thank you to everyone, I'll play with these suggestions tomorrow at
work and report back.
On Jun 25, 2009, at 8:04 PM, Carl Banks wrote:
Because Fredrick Lundh wanted it that way. Unlike most Python
libraries ElementTree is under the control of one person, which means
it was not designed or
On Jun 25, 6:02 pm, Kee Nethery wrote:
> Summary: I have XML as string and I want to pull it into ElementTree
> so that I can play with it but it is not working for me. XML and
> fromstring when used with a string do not do the same thing as parse
> does with a file. How do I get this to wor
On Jun 25, 9:02 pm, Kee Nethery wrote:
> Summary: I have XML as string and I want to pull it into ElementTree
> so that I can play with it but it is not working for me. XML and
> fromstring when used with a string do not do the same thing as parse
> does with a file. How do I get this to work?
>
>
On Thu, 25 Jun 2009 18:02:25 -0700, Kee Nethery wrote:
> Summary: I have XML as string and I want to pull it into ElementTree
> so that I can play with it but it is not working for me. XML and
> fromstring when used with a string do not do the same thing as parse
> does with a file. How do I
Summary: I have XML as string and I want to pull it into ElementTree
so that I can play with it but it is not working for me. XML and
fromstring when used with a string do not do the same thing as parse
does with a file. How do I get this to work?
Details:
I have a CGI that receives XML via
13 matches
Mail list logo