Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Post Timeline

Source Link
johnpaultthomas
johnpaultthomas

The DOM has (atleast in level 2) an interface DATASection, and an operation Document::createCDATASection. They are extension interfaces, supported only if an implementation supports the "xml" feature.

from xml.dom import minidom

my_xmldoc=minidom.parse(xmlfile)

my_xmldoc.createCDATASection(data)

now u have cadata node add it wherever u want....

Post Made Community Wiki by Community Bot
default

AltStyle によって変換されたページ (->オリジナル) /