By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,932 Members | 1,944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,932 IT Pros & Developers. It's quick & easy.

Minidom output of XML escaped characters

P: n/a
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

Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Derek Basch wrote:
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>

Jul 18 '05 #2

P: n/a
Thanks effbot. I haven't had much use for XML comments so far and I
guess other people haven't either because it seems they are hardly ever
mentioned.

http://groups-beta.google.com/groups...=Search+Groups

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.