[
Lists Home |
Date Index |
Thread Index
]
List,
How do I add a new line to the XML displayed in the browser and in the file
opened by a text editor such as Notepad without changing all of the ints to
strings?
I have the following C++ code:
MSXML::IXMLDOMNodePtr pRootNode, pNode, pChildNode,pSubChildNode = NULL;
hr = xmlDomInterface.CreateEmptyDocument();
CHECKHR(hr);
int tmpNum;
//Create the root
pRootNode =
xmlDomInterface.CreateRootElement(tmpFileName.AllocSysString());
for(i=0;i<MAX;i++)
{
tmpNum = GetNumber(i);
//many other ints defined here
}
pNode = xmlDomInterface.CreateDOMNode(MSXML::NODE_ELEMENT,
infoNode[0].AllocSysString());
hr = pRootNode->appendChild(pNode);
CHECKHR(hr);
hr =
xmlDomInterface.SetAttribute(pNode,attribName[0].AllocSysString(),tmpNum);
CHECKHR(hr);
//many other ints added here
Thank you for your assistance.
|