Sunday, April 10, 2011

8.7.2 DOM Example

8.7.2 DOM Example: "dom = xml.dom.minidom.parseString(document)

def getText(nodelist):
rc = ''
for node in nodelist:
if node.nodeType == node.TEXT_NODE:
rc = rc + node.data
return rc

def handleSlideshow(slideshow):
print ''
handleSlideshowTitle(slideshow.getElementsByTagName('title')[0])
slides = slideshow.getElementsByTagName('slide')
handleToc(slides)
handleSlides(slides)
print ''"