protected void AppendChildNode(XmlNode parentNode, string elementName, string value, string nodeNamespace) { AirSyncDiagnostics.TraceInfo(ExTraceGlobals.AirSyncTracer, this, "Appending Namespace = {0} Node={1} Value={2} to {3}", new object[] { nodeNamespace, elementName, AirSyncProperty.GetValueToTrace(value, elementName), parentNode.Name }); XmlNode xmlNode = this.xmlParentNode.OwnerDocument.CreateElement(elementName, nodeNamespace); xmlNode.InnerText = value; parentNode.AppendChild(xmlNode); }
protected void CreateAirSyncNode(string airSyncTagName, string strData) { AirSyncDiagnostics.TraceInfo <string, string>(ExTraceGlobals.AirSyncTracer, this, "Creating Node={0} Value={1}", airSyncTagName, AirSyncProperty.GetValueToTrace(strData, airSyncTagName)); this.xmlNode = this.xmlParentNode.OwnerDocument.CreateElement(airSyncTagName, this.xmlNodeNamespace); this.xmlNode.InnerText = strData; this.xmlParentNode.AppendChild(this.xmlNode); }
protected void CreateAirSyncNode(string strData, bool allowEmptyNode) { AirSyncDiagnostics.TraceInfo <string, string>(ExTraceGlobals.AirSyncTracer, this, "Creating Node={0} Value={1}", this.airSyncTagNames[0], AirSyncProperty.GetValueToTrace(strData, this.airSyncTagNames[0])); if (allowEmptyNode || !string.IsNullOrEmpty(strData)) { this.xmlNode = this.xmlParentNode.OwnerDocument.CreateElement(this.airSyncTagNames[0], this.xmlNodeNamespace); this.xmlNode.InnerText = strData; this.xmlParentNode.AppendChild(this.xmlNode); } }
protected void AppendChildNode(string elementName, string value) { AirSyncDiagnostics.TraceInfo <string, string>(ExTraceGlobals.AirSyncTracer, this, "Creating Node={0} Value={1}", elementName, AirSyncProperty.GetValueToTrace(value, elementName)); XmlNode xmlNode = this.xmlParentNode.OwnerDocument.CreateElement(elementName, this.xmlNodeNamespace); xmlNode.InnerText = value; this.xmlNode.AppendChild(xmlNode); }
protected void AppendChildCData(XmlNode parentNode, string elementName, string value) { AirSyncDiagnostics.TraceInfo <string, string, string>(ExTraceGlobals.AirSyncTracer, this, "Creating CData Node={0} Value={1} to {2}", elementName, AirSyncProperty.GetValueToTrace(value, elementName), parentNode.Name); XmlNode xmlNode = this.xmlParentNode.OwnerDocument.CreateElement(elementName, this.xmlNodeNamespace); XmlCDataSection newChild = this.xmlParentNode.OwnerDocument.CreateCDataSection(value); xmlNode.AppendChild(newChild); parentNode.AppendChild(xmlNode); }