I am working with an XML database and have large chunks of text in certain
child and grandchildren nodes.
Because I consider well-formed XML to wrap at 70 characters and indent
children, I end up with a lot of extra white space in the node.text string. (I
parse with ElementTree.)
I thought about using pytextile to convert this text to HTML for a nicer
display option, using a wx.HTMLWindow (I don't need much in the way of fancy
HTML for this application.)
However, when I convert my multiple-paragraph text object with textile, my
original line breaks are preserved. Since I'm going to HTML, I d'nt want my
line breaks preserved.
Example (may be munged, formatting-wise):
<pre>
<action>
<description>This is a long multi-line description
with several paragraphs and hopefully, eventually,
proper HTML P-tags.
This is a new paragraph. It should be surrounded
by its own P-tag.
Hopefully (again), I won't have a bunch of unwanted
BR tags thrown in.
</description>
</action>
</pre>
I've tried several ways of pre-processing the text in the node, but pytextile
still gives me line breaks.
Any suggestions? Is there a good tutorial for PyTextile that I haven't found?
Thanks.
Josh
--
http://mail.python.org/mailman/listinfo/python-list