Createing nodes dynamically

M

matauy

I want to modify the XMl dynamically

parent = thisXDocument.DOM.selectSingleNode("Place to add");
my_AgendaItem = thisXDocument.DOM.createElement("my:AgendaItem");
parent.appendChild(my_AgendaItem);

The error is: The namespace prefix my in the following element does not map
to a URI:
 
M

matauy

Justa aclosure..

I workd arround the answer by using createNode function insted of
createElement:

IXMLDOMElement parent = thisXDocument.DOM.selectSingleNode("place to add");

IXMLDOMElement my_AgendaItem = thisXDocument.DOM.createNode(1,
"my:AgendaItem", parent.namespaceURI);

parent.appendChild(my_AgendaItem);
 
Top