[Home] [By Thread] [By Date] [Recent Entries]

  • To: xml-dev@l...
  • Subject: xml question - new line
  • From: "Nicole Redmond" <nredmond@l...>
  • Date: Fri, 19 Jul 2002 15:30:43 -0400
  • Importance: Normal
  • Original-to: <xml-dev@l...>

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.


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member