Hello everyone,
I have some problem in loading an xmldom object to another node of an xmldom
object. I can load the html
content into an xmldom object, such as HTMLDOM. But I am not sure how
to append the HTMLDOM to one specific node of my original xmldom object. My
code is something like the following:
'my original xmlDom object
Set xmldoc = Server.CreateObject("Microsoft.XMLDOM"
'htmlDom to store html content
Set htmlDom = Server.CreateObject("Microsoft.XMLDOM"
HTMLString = '<snippet>' + HTMLString + '</snippet>';
HTMLDOM.loadXML(HTMLString);
' Build the XML document here
If (xmldoc.childNodes.length = 0) Then
Set root = xmldoc.createNode("element", "report", ""
xmldoc.appendChild (root)
Set rootnode = xmldoc.createNode("element", "row", ""
root.appendChild(rootnode)
'column node
Set colNode = xmldoc.createNode("element", "column", ""
rootnode.appendChild(colNode)
Set innernode = xmldoc.createNode("element","caption",""
innernode.Text ="ID"
colNode.appendChild(innernode)
Set innernode = xmldoc.createNode("element","value",""
??? ???
'Here I want to append htmlDom to the value node, but I am not sure how
to do it. I have a play with Chris Bayes's domtodom.js code
( but have no idea how
to implement the javascript functions into my case here. Some suggestions
here will be most appreciated..
Thanks in advance
Henry
I have some problem in loading an xmldom object to another node of an xmldom
object. I can load the html
content into an xmldom object, such as HTMLDOM. But I am not sure how
to append the HTMLDOM to one specific node of my original xmldom object. My
code is something like the following:
'my original xmlDom object
Set xmldoc = Server.CreateObject("Microsoft.XMLDOM"
'htmlDom to store html content
Set htmlDom = Server.CreateObject("Microsoft.XMLDOM"
HTMLString = '<snippet>' + HTMLString + '</snippet>';
HTMLDOM.loadXML(HTMLString);
' Build the XML document here
If (xmldoc.childNodes.length = 0) Then
Set root = xmldoc.createNode("element", "report", ""
xmldoc.appendChild (root)
Set rootnode = xmldoc.createNode("element", "row", ""
root.appendChild(rootnode)
'column node
Set colNode = xmldoc.createNode("element", "column", ""
rootnode.appendChild(colNode)
Set innernode = xmldoc.createNode("element","caption",""
innernode.Text ="ID"
colNode.appendChild(innernode)
Set innernode = xmldoc.createNode("element","value",""
??? ???
'Here I want to append htmlDom to the value node, but I am not sure how
to do it. I have a play with Chris Bayes's domtodom.js code
( but have no idea how
to implement the javascript functions into my case here. Some suggestions
here will be most appreciated..
Thanks in advance
Henry