Parsing XML from Strings : XML Parse : XML PYTHON examples


PYTHON examples » XML » XML Parse »

 

Parsing XML from Strings


Parsing XML from Strings
 
from xml.dom import minidom

contents = "<grammar><ref id='bit'><p>0</p><p>1</p></ref></grammar>" 
xmldoc = minidom.parseString(contents)             
print xmldoc.toxml() 
           
         
  



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo XML
» XML Parse