MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 3 as of 2018-07-06 16:13:30
  • Python
  • minidom

Python minidom

DOM (Document Object Model interface)

  • https://docs.python.org/2/library/xml.dom.minidom.html

XML parse with minidom

   1 from xml.dom import minidom
   2 print("Hello world")
   3 a="<a><b>aaaa</b><b>bbcc</b></a>"
   4 doc = minidom.parseString(a) # return document 
   5 tags = doc.getElementsByTagName("b")
   6 for t in tags:
   7   print(t.firstChild.nodeValue)
   8 
   9 print( doc.toprettyxml() )
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01