I'm trying to set text into a DOM element. I create the element.
svg_doc = minidom.parse('PATH_TO_SVG_FILE.svg')
category = svg_doc.createElement('category')
Then I try to set the nodeValue
:
category.nodeValue = 'Design'
But I get:
<category/>
instead of:
<category>Design<category/>
How to get the desired result with minidom?
I think this should work:
category.createTextNode('Design')