Chaim Krause, 13.04.2010 17:26:
I am building a web page (HTML 4.01 Transitional) using
xml.dom.minidom. I have created a<script>  node and I have added the
Javascript as a child text node. The issue is that the Javascript
includes quotes that I want to survive when I write the XML to a file.
The issue for me is that they are translated into&quot;.

You should use an HTML generator tool rather than a generic XML tool like xml.dom.minidom. You need something that knows that the <script> tag contains CDATA content in HTML, and that can serialise in an HTML aware way (self-closing tags, etc.).

Check the Python Wiki or PyPI, they have tons of HTML generators.

Stefan

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to