views:

317

answers:

1

Is there any Python library or some sample code which demonstrates how to convert basic HTML into RML (Reportlab Markup Language www.reportlab.org)? I can think of using a regular HTML parser and adding some home grown code to generate the RML, but I guess there will be a lot of cases to handle in such a conversion.

A: 

You shouldn't have much trouble doing this. Aside from some differences in element names, it's pretty straightforward: just ignore any HTML elements that can't be easily converted/you don't care about converting to RML and do the rest. I'm sure the ReportLab folks would be glad if you contributed even a basic HTML to RML parser to the project.

Gordon Worley
Thanx. I will try to come up with something.
Shailesh Kumar