[reportlab-users] pyRXP -> XML

Andy Robinson reportlab-users@reportlab.com
Mon, 2 Dec 2002 18:48:27 -0000


This is a multi-part message in MIME format.

------=_NextPart_000_000B_01C29A33.66989340
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Alex Martelli also made very nice suggestions about
using generators and iterators to make iteration nice.

We'll try to work this in during the week.

- Andy
  -----Original Message-----
  From: reportlab-users-admin@reportlab.com
[mailto:reportlab-users-admin@reportlab.com]On Behalf Of Aaron Watters
  Sent: 02 December 2002 17:14
  To: reportlab-users@reportlab.com
  Subject: Re: [reportlab-users] pyRXP -> XML


  Great!

  The object tree idea is nice.  The reason we didn't do it that way
  is because it potentially adds a great deal of overhead.
  Also Andy, Robin and I didn't think

  (name, attributes, content, extra) = parse
  goobervalue = attributes["goober"]
  for c in content:
      doSomethingWith(c)

  was really that unpleasant to work with.   However it might be
  nice to do something cleaner like

  goobervalue = parse.goober
  for c in parse:
      doSomethingWith(c)

  But if implemented in python I suspect you'd see
  a noticable performance hit.

  Good luck!

     -- Aaron Watters

  Eric van Riet Paap wrote:

    Hi,

    I'm working on some small additions to your pyRXP package. So far I only
have one useful function. Perhaps you can put in the next version of pyRXP
if you find is worthwhile! The one function I have currently convert a pyRXP
tuple back to XML (for saving xml), this is very handy when you modify the
tuple after parsing it with pyRXP) . The source it very small, the zip file
somewhat large (for what it does) because some large xml files are embedded
for unittesting. Another thing I plan add is a convertor for pyRXP tuples to
an object-tree where the goal is to accessing the data is as straigtforward
as possible. pyRXP tuples are very clean,small,etc. but accessing them is
not really clean looking.

    All comments are welcome!

    kind regards,
    Eric van Riet paap
    Utrecht, The Netherlands




------=_NextPart_000_000B_01C29A33.66989340
Content-Type: text/html;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D059094618-02122002><FONT face=3DArial color=3D#0000ff =
size=3D2>Alex=20
Martelli also made very nice suggestions about</FONT></SPAN></DIV>
<DIV><SPAN class=3D059094618-02122002><FONT face=3DArial color=3D#0000ff =
size=3D2>using=20
generators and iterators to make iteration nice.</FONT></SPAN></DIV>
<DIV><SPAN class=3D059094618-02122002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D059094618-02122002><FONT face=3DArial color=3D#0000ff =
size=3D2>We'll=20
try to work this in during the week.</FONT></SPAN></DIV>
<DIV><SPAN class=3D059094618-02122002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D059094618-02122002><FONT face=3DArial color=3D#0000ff =
size=3D2>-=20
Andy</FONT></SPAN></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B>=20
  reportlab-users-admin@reportlab.com=20
  [mailto:reportlab-users-admin@reportlab.com]<B>On Behalf Of </B>Aaron=20
  Watters<BR><B>Sent:</B> 02 December 2002 17:14<BR><B>To:</B>=20
  reportlab-users@reportlab.com<BR><B>Subject:</B> Re: [reportlab-users] =
pyRXP=20
  -&gt; XML<BR><BR></FONT></DIV>Great!<BR><BR>The object tree idea is =
nice.=20
  &nbsp;The reason we didn't do it that way<BR>is because it potentially =
adds a=20
  great deal of overhead.<BR>Also Andy, Robin and I didn't =
think<BR><BR>(name,=20
  attributes, content, extra) =3D parse<BR>goobervalue =3D=20
  attributes["goober"]<BR>for c in content:<BR>&nbsp; &nbsp;=20
  doSomethingWith(c)<BR><BR>was really that unpleasant to work with. =
&nbsp;=20
  However it might be<BR>nice to do something cleaner =
like<BR><BR>goobervalue =3D=20
  parse.goober<BR>for c in parse:<BR>&nbsp; &nbsp; =
doSomethingWith(c)<BR><BR>But=20
  if implemented in python I suspect you'd see<BR>a noticable =
performance=20
  hit.<BR><BR>Good luck!<BR><BR>&nbsp; &nbsp;-- Aaron =
Watters<BR><BR>Eric van=20
  Riet Paap wrote:<BR>
  <BLOCKQUOTE cite=3Dmid:003a01c29a24$9cada100$9700000a@ericowxkwws9hl=20
type=3D"cite">
    <META content=3D"MSHTML 6.00.2722.900" name=3DGENERATOR>
    <STYLE></STYLE>

    <DIV>
    <DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
    <DIV>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>I'm working on some small additions =
to your=20
    pyRXP package. So far I only have one useful function. Perhaps you =
can put=20
    in the next version of pyRXP if you find is worthwhile! The one =
function I=20
    have currently convert a pyRXP tuple back to XML (for saving xml), =
this is=20
    very handy when you modify the tuple after parsing it with pyRXP) . =
The=20
    source it very small, the zip file somewhat large (for what it does) =
because=20
    some large xml files are embedded for unittesting. Another thing I =
plan add=20
    is a convertor for pyRXP tuples to an object-tree where the goal is =
to=20
    accessing the data is as straigtforward as possible. pyRXP tuples =
are very=20
    clean,small,etc. but accessing them is not really clean=20
looking.</FONT></DIV>
    <DIV>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>All comments are =
welcome!</FONT></DIV>
    <DIV>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>kind regards,</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>Eric van Riet paap</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>Utrecht, The =
Netherlands</FONT></DIV>
    <DIV>&nbsp;</DIV></DIV></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_000B_01C29A33.66989340--