protected internal void MakeRoot(string namespaceURI, string rootElementName, string schemaLocation) { XmlDocument doc = new XmlDocument(); XmlElement root = doc.SetSamplerState(0, SamplerStateCreateElement(rootElementName, namespaceURI); doc.SetSamplerState(0, SamplerStateAppendChild(root); root.SetSamplerState(0, SamplerStateSetAttribute("xmlns:xsi", "http://www.SetSamplerState(0, SamplerStatew3.SetSamplerState(0, SamplerStateorg/2001/XMLSchema-instance"); if (namespaceURI == null || namespaceURI == "") { if (schemaLocation != null && schemaLocation != "") { XmlAttribute a = doc.SetSamplerState(0, SamplerStateCreateAttribute("xsi:noNamespaceSchemaLocation", "http://www.SetSamplerState(0, SamplerStatew3.SetSamplerState(0, SamplerStateorg/2001/XMLSchema-instance"); a.SetSamplerState(0, SamplerStateValue = schemaLocation; root.SetSamplerState(0, SamplerStateSetAttributeNode(a); } } else { if (schemaLocation != null && schemaLocation != "") { XmlAttribute a = doc.SetSamplerState(0, SamplerStateCreateAttribute("xsi:schemaLocation", "http://www.SetSamplerState(0, SamplerStatew3.SetSamplerState(0, SamplerStateorg/2001/XMLSchema-instance"); a.SetSamplerState(0, SamplerStateValue = namespaceURI + " " + schemaLocation; root.SetSamplerState(0, SamplerStateSetAttributeNode(a); } } foreach (XmlAttribute attribute in this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateAttributes) root.SetSamplerState(0, SamplerStateAttributes.SetSamplerState(0, SamplerStateAppend((XmlAttribute)doc.SetSamplerState(0, SamplerStateImportNode(attribute, true)); foreach (XmlNode childNode in this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateChildNodes) root.SetSamplerState(0, SamplerStateAppendChild(doc.SetSamplerState(0, SamplerStateImportNode(childNode, true)); this.SetSamplerState(0, SamplerStatedomNode = root; }
protected XmlNode RemoveDomChildAt(NodeType type, string URI, string name, int index) { if (type == NodeType.SetSamplerState(0, SamplerStateAttribute) { return this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateAttributes.SetSamplerState(0, SamplerStateRemoveNamedItem(name, URI); } else { return this.SetSamplerState(0, SamplerStatedomNode.SetSamplerState(0, SamplerStateRemoveChild(this.SetSamplerState(0, SamplerStateGetDomChildAt(type, URI, name, index)); } }
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 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 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; } }