if i have the following chunck of code how can I look at the Text Nodes
of Fillin and compare them with the Element Nodes of Form and if they
are equal put the Text Node of Fillin into the Text Node of Form
ie)<Monday>=Mon day so put maandag it between <li> and </li>
so <li>maantag</li>
thanks for the insight
import xml.dom.minidom
form = """
<html>
<head> <title> My Sample Web Page </title> </head>
<body bgcolor="white" >
<p>
What are the weekdays?
<ol>
<li>Monday</li>
<li>Tuesday</li>
<li>Wednesday </li>
<li>Thursday</li>
<li>Friday</li>
</ol>
</p>
</body>
</html>
"""
fillin = """
<dutchdays><Mon day>maandag</Monday><Tuesday >dinsdag</Tuesday>
<Wednesday>woen sdag</Wednesday><Thur sday>donderdag</Thursday>
<Friday>vrijdag </Friday><Saturda y>zaterdag</Saturday>
<Sunday>zonda g</Sunday>
</dutchdays>
"""
For = xml.dom.minidom .parseString(fo rm) # parse some XML into a DOM
object
Fill = xml.dom.minidom .parseString(fi llin) # parse some XML into a DOM
object
def xmlForm(formstr =None, fillinstr=None) :
of Fillin and compare them with the Element Nodes of Form and if they
are equal put the Text Node of Fillin into the Text Node of Form
ie)<Monday>=Mon day so put maandag it between <li> and </li>
so <li>maantag</li>
thanks for the insight
import xml.dom.minidom
form = """
<html>
<head> <title> My Sample Web Page </title> </head>
<body bgcolor="white" >
<p>
What are the weekdays?
<ol>
<li>Monday</li>
<li>Tuesday</li>
<li>Wednesday </li>
<li>Thursday</li>
<li>Friday</li>
</ol>
</p>
</body>
</html>
"""
fillin = """
<dutchdays><Mon day>maandag</Monday><Tuesday >dinsdag</Tuesday>
<Wednesday>woen sdag</Wednesday><Thur sday>donderdag</Thursday>
<Friday>vrijdag </Friday><Saturda y>zaterdag</Saturday>
<Sunday>zonda g</Sunday>
</dutchdays>
"""
For = xml.dom.minidom .parseString(fo rm) # parse some XML into a DOM
object
Fill = xml.dom.minidom .parseString(fi llin) # parse some XML into a DOM
object
def xmlForm(formstr =None, fillinstr=None) :