Parse XML using Python

Diez B. Roggisch deetsNOSPAM at web.de
Thu Dec 9 09:27:50 EST 2004


Anil wrote:

> Could you please tell me how to achieve the below.
> I am interested in  getting the output like:
> 
> ABC
> EFGA   --> child of ABC
> ABDG   --> child of AEFGA
> MON   --> child of ABC
> A1
>      FGA   --> child of A1
>      BG    --> child of FGA

print """
ABC
EFGA   --> child of ABC
ABDG   --> child of AEFGA
MON   --> child of ABC
A1
     FGA   --> child of A1
     BG    --> child of FGA
"""

Unless you don't tell us what _input_ shall be processed to yield that
output, I doubt anybody can be of more help....

-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list