Hi
This is a weird one. I'm using a reference to msxml3.dll and the following code to generate an xml file:
...etc etc to create the other nodes in the pageCode:'Create "message" node Set xmln_message = xmlDoc.createNode(XMLELEMTYPE_TEXT, "message", "") xmlDoc.appendChild xmln_message Set xmlAttribute = xmlDoc.createAttribute("xmlns") xmlAttribute.Value = "http://www.origoservices.com" xmln_message.Attributes.setNamedItem xmlAttribute Set xmlAttribute = xmlDoc.createAttribute("xmlns:fp") xmlAttribute.Value = "http://www.friendsprovident.com" xmln_message.Attributes.setNamedItem xmlAttribute Set xmlAttribute = xmlDoc.createAttribute("xmlns:origo") xmlAttribute.Value = "http://www.origoservices.com" xmln_message.Attributes.setNamedItem xmlAttribute Set xmlAttribute = xmlDoc.createAttribute("xmlns:x") xmlAttribute.Value = "http://www.origoservices.com" xmln_message.Attributes.setNamedItem xmlAttribute Set xmlAttribute = xmlDoc.createAttribute("xmlns:xsi") xmlAttribute.Value = "http://www.w3.org/2001/XMLSchema-instance" xmln_message.Attributes.setNamedItem xmlAttribute 'Create "m_control" node Set xmln_mcontrol = xmlDoc.createNode(XMLELEMTYPE_TEXT, "m_control", "") xmln_message.appendChild xmln_mcontrol
all the objects have been properly instantiated etc and all the nodes with child nodes have their own object variable. The problem is that the "xmlns" attribute although only added to the "message" node, appears on all of the child nodes of "message" as well, im currently using a workaround by using a replace function on the generated xml to remove the unneeded "xmlns" attributes but obviously i would prefer to avoid it happening at all. Strangely it does not do the same with the other attributes of the "message" node. any help would be much appreciated with this one!




Reply With Quote