M
Mike Surface
Given the following code sample:
thisXDocument.DOM.preserveWhiteSpace = false;
IXMLDOMNodeList resultsList = null;
// assume resultsList gets populated by a web service call
IXMLDOMNode root = thisXDocument.DOM.selectSingleNode("/my:myFields/my:Root");
IXMLDOMNode nodeToCopy = root.selectSingleNode("myata").cloneNode(true);
// remove placeholder node
root.removeChild(nodeToCopy);
foreach (IXMLDOMNode node in resultsList)
{
IXMLDOMNode newNode = nodeToCopy.cloneNode(true);
newNode.selectSingleNode("myataValue").text = node.text;
root.appendChild(newNode);
}
string sXML = root.xml;
// notice that the xml contains \t's and \n's between nodes which causes problems
// when iterating node lists (white space is counted as a child of root
How can I tell InfoPath to not put whitespace between the nodes?
Mike.
thisXDocument.DOM.preserveWhiteSpace = false;
IXMLDOMNodeList resultsList = null;
// assume resultsList gets populated by a web service call
IXMLDOMNode root = thisXDocument.DOM.selectSingleNode("/my:myFields/my:Root");
IXMLDOMNode nodeToCopy = root.selectSingleNode("myata").cloneNode(true);
// remove placeholder node
root.removeChild(nodeToCopy);
foreach (IXMLDOMNode node in resultsList)
{
IXMLDOMNode newNode = nodeToCopy.cloneNode(true);
newNode.selectSingleNode("myataValue").text = node.text;
root.appendChild(newNode);
}
string sXML = root.xml;
// notice that the xml contains \t's and \n's between nodes which causes problems
// when iterating node lists (white space is counted as a child of root
How can I tell InfoPath to not put whitespace between the nodes?
Mike.