Commit 7d5c5780 authored by Miguel Tremblay's avatar Miguel Tremblay
Browse files

Remove argument domDoc in methods for pyxml compatibility.

parent 6bad767b
......@@ -55,9 +55,9 @@ def write_date( sXml_tag, fDate ):
sDate = metro_date.seconds2iso8601(fDate)
return metro_xml.create_text_node(sXml_tag, sDate)
def write_list( domDoc, sXml_list_tag, lChildList, lValues ):
def write_list( sXml_list_tag, lChildList, lValues ):
listNode = metro_xml.create_node( domDoc, sXml_list_tag)
listNode = metro_xml.create_node( sXml_list_tag)
#
# Get handler
......@@ -76,7 +76,7 @@ def write_list( domDoc, sXml_list_tag, lChildList, lValues ):
for val in lValues:
# Construction of instruction doing the function call that will
# create the node
sCode = "nodeData = " + sWriteHandler + "(domDoc,sXml_tag,val)"
sCode = "nodeData = " + sWriteHandler + "(sXml_tag,val)"
exec sCode
......
......@@ -265,8 +265,8 @@ def cd_xpath( nodeBranch, sXpath ):
nodeChild = None
return nodeChild
def create_node( domDoc, sNode_name):
return metro_xml_lib.create_node(domDoc, sNode_name)
def create_node( sNode_name):
return metro_xml_lib.create_node(sNode_name)
def create_text_node(sNode_name, sNode_value ):
return metro_xml_lib.create_text_node(sNode_name, sNode_value )
......@@ -311,6 +311,7 @@ def create_node_tree_from_dict( domDoc, nodeParent, lDefs, dData ):
# create the node
sCode = "nodeData = " + sWriteHandler + \
"(sXml_tag,dData[sTag])"
print sCode
exec sCode
append_child(nodeParent, nodeData)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment