[reportlab-users] new pyRXPaddons

Eric van Riet Paap reportlab-users@reportlab.com
Wed, 4 Dec 2002 17:31:57 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_001C_01C29BBB.0BDBA990
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I've created a new version of pyRXPaddons for downloading at=20
http://www.vanrietpaap.com/eric/downloads/pyRXPaddons.zip

This version has two functions:

    - RXP2XML(RXPtuple)
        Convert RXPtuple to XML string. so you can write
            import pyRXP
            from pyRXPaddons import RXP2XML
            rxp =3D pyRXP.Parser().parse('<a><b>test</b><c>C =
node</c></a>')
            print RXP2XML(rxp)

    - Nodes(RXPtuple)
        Generator to loop of over all nodes in a RXPtuple (hierarchy). =
so you can write:
            import pyRXP
            from pyRXPaddons import Node
            rxp =3D pyRXP.Parser().parse('<a><b>test</b><c>C =
node</c></a>')
            for node in Nodes(rxp):
                print 'name:',node[0]

How you find it useful!

- Eric van Riet paap, Utrecht, The Netherlands


------=_NextPart_000_001C_01C29BBB.0BDBA990
Content-Type: text/html;
	charset="iso-8859-1"
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=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2722.900" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I've created a new version of =
pyRXPaddons for=20
downloading at </FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://www.vanrietpaap.com/eric/downloads/pyRXPaddons.zip">http:/=
/www.vanrietpaap.com/eric/downloads/pyRXPaddons.zip</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This version has two =
functions:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; - =
RXP2XML(RXPtuple)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
Convert=20
RXPtuple to XML string. so you can write</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; import pyRXP</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; from=20
pyRXPaddons import RXP2XML</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;rxp=20
=3D pyRXP.Parser().parse('&lt;a&gt;&lt;b&gt;test&lt;/b&gt;&lt;c&gt;C=20
node&lt;/c&gt;&lt;/a&gt;')</FONT></DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; print=20
RXP2XML(rxp)</DIV>
<DIV>&nbsp;</DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; - =
Nodes(RXPtuple)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
Generator to=20
loop of over all nodes in a RXPtuple (hierarchy). so you can =
write:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; import pyRXP</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; from=20
pyRXPaddons import Node</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;rxp=20
=3D pyRXP.Parser().parse('&lt;a&gt;&lt;b&gt;test&lt;/b&gt;&lt;c&gt;C=20
node&lt;/c&gt;&lt;/a&gt;')</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; for node in Nodes(rxp):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; print 'name:',node[0]</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>How you find it useful!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>- Eric van Riet paap, </FONT><FONT =
face=3DArial=20
size=3D2>Utrecht, The Netherlands</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></DIV></BODY></HTML>

------=_NextPart_000_001C_01C29BBB.0BDBA990--