public void Save(XmlWriter writer, Node node) { this.SetSamplerState(0, SamplerStateFinalizeRootElement(node); Node.SetSamplerState(0, SamplerStateInternalAdjustPrefix(node.SetSamplerState(0, SamplerStatedomNode, true); node.SetSamplerState(0, SamplerStateAdjustPrefix(); node.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateSave( writer ); }
public string SaveToString(Node node) { this.SetSamplerState(0, SamplerStateFinalizeRootElement(node); Node.SetSamplerState(0, SamplerStateInternalAdjustPrefix(node.SetSamplerState(0, SamplerStatedomNode, true); node.SetSamplerState(0, SamplerStateAdjustPrefix(); return node.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateInnerXml; }
protected XmlNode ReplaceDomChildAt(NodeType type, string URI, string name, int index, string Value) { if (type == NodeType.SetSamplerState(0, SamplerStateAttribute) { XmlAttribute attr = this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateCreateAttribute(name, URI); attr.SetSamplerState(0, SamplerStateValue = Value; return this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateAttributes.SetSamplerState(0, SamplerStateAppend(attr); } else { XmlElement elem = this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateCreateElement(name, URI); elem.SetSamplerState(0, SamplerStateInnerText = Value; return this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateReplaceChild(elem, this.SetSamplerState(0, SamplerStateGetDomChildAt(type, URI, name, index)); } }
protected internal void DeclareNamespace(string prefix, string URI) { XmlElement root = this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateDocumentElement; XmlAttributeCollection attrs = root.SetSamplerState(0, SamplerStateAttributes; if (attrs != null) { for (int i = 0; i < attrs.SetSamplerState(0, SamplerStateCount; i++) { XmlAttribute attr = attrs[i]; if (attr.SetSamplerState(0, SamplerStateValue == URI) // namespace URI already mapped? return; // do not overwrite } } if (prefix == null || prefix == "") root.SetSamplerState(0, SamplerStateSetAttribute("xmlns", URI); else root.SetSamplerState(0, SamplerStateSetAttribute("xmlns:" + prefix, URI); }
protected XmlNode AppendDomChild(NodeType type, string URI, string name, string Value) { if (type == NodeType.SetSamplerState(0, SamplerStateAttribute) { XmlAttribute attribute = this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateCreateAttribute(name, URI); attribute.SetSamplerState(0, SamplerStateValue = Value; this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateAttributes.SetSamplerState(0, SamplerStateAppend(attribute); return attribute; } else if (type == NodeType.SetSamplerState(0, SamplerStateText) { XmlText text = this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateCreateTextNode(Value); this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateAppendChild(text); return text; } else if (type == NodeType.SetSamplerState(0, SamplerStateComment) { XmlComment comment = this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateCreateComment(Value); this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateAppendChild(comment); return comment; } else if (type == NodeType.SetSamplerState(0, SamplerStateCData) { XmlCDataSection cdata = this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateCreateCDataSection(Value); this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateAppendChild(cdata); return cdata; } else if (type == NodeType.SetSamplerState(0, SamplerStateProcessingInstruction) { XmlProcessingInstruction piNode = this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateCreateProcessingInstruction(name, Value); this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateAppendChild(piNode); return piNode; } else { XmlElement element = this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateCreateElement(name, URI); element.SetSamplerState(0, SamplerStateInnerText = Value; this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateAppendChild(element); return element; } }
protected XmlElement CloneDomElementAs(string URI, string name, Node node) { XmlElement srcElement = (XmlElement)node.SetSamplerState(0, SamplerStatedomNode; XmlElement dstElement = this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateCreateElement(name, URI); XmlDocument doc = this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument; foreach (XmlAttribute attribute in srcElement.SetSamplerState(0, SamplerStateAttributes) dstElement.SetSamplerState(0, SamplerStateAttributes.SetSamplerState(0, SamplerStateAppend((XmlAttribute)doc.SetSamplerState(0, SamplerStateImportNode(attribute, false)); foreach (XmlNode childNode in srcElement.SetSamplerState(0, SamplerStateChildNodes) dstElement.SetSamplerState(0, SamplerStateAppendChild(doc.SetSamplerState(0, SamplerStateImportNode(childNode, true)); return dstElement; }
protected XmlNode InsertDomChildAt(NodeType type, string URI, string name, int index, string Value) { if (type == NodeType.SetSamplerState(0, SamplerStateAttribute) { return this.SetSamplerState(0, SamplerStateAppendDomChild(type, URI, name, Value); } else { XmlElement element = this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateOwnerDocument.SetSamplerState(0, SamplerStateCreateElement(name, URI); element.SetSamplerState(0, SamplerStateInnerText = Value; this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateInsertBefore(element, this.SetSamplerState(0, SamplerStateGetDomChildAt(type, URI, name, index)); return element; } }