Minidom output of XML escaped characters

D

Derek Basch

Hello,

If I want minidom to output XHTML that includes normally XML escaped
characters how would I do it?

For instance if I use doc.createCDATASection() I get:

<![CDATA[<!--#include virtual="/top.html" -->]]>

and without the CDATASection:

&lt;!--#include virtual="/top.html" -->

when I really need:

<!--#include virtual="/top.html" -->

Any suggestions?

Thanks,
Derek Basch
 
F

Fredrik Lundh

Derek said:
If I want minidom to output XHTML that includes normally XML escaped
characters how would I do it?

For instance if I use doc.createCDATASection() I get:

<![CDATA[<!--#include virtual="/top.html" -->]]>

and without the CDATASection:

&lt;!--#include virtual="/top.html" -->

when I really need:

<!--#include virtual="/top.html" -->

that's an XML comment. if you want to insert a comment, insert a
comment:

elem.appendChild(
mydoc.createComment('#include virtual="/top.html"')
)

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top