Mono Class Library: System.Xml.XmlDocument Overview | Members

System.Xml.XmlDocument.CreateNode Method

Creates an System.Xml.XmlNode instance.

public virtual XmlNode CreateNode (string nodeTypeString, string name, string namespaceURI)

Parameters

nodeTypeString
Node type name that indicates the type of node to be created.
name
Name string of the node to be created.
namespaceURI
Namespace URI string of the node to be created.

Returns

An System.Xml.XmlNode instance as indicated by the parameters.

Remarks

Creates an System.Xml.XmlNode instance. It internally invokes XmlDocument.CreateNode(XmlNodeType, string, string) method, with interpreted System.Xml.XmlNodeType from nodeTypeString parameter, as listed below:

StringCorresponding node type
attributeXmlNodeType.Attribute
cdatasectionXmlNodeType.CDATA
commentXmlNodeType.Comment
documentXmlNodeType.Document
documentfragmentXmlNodeType.DocumentFragment
documenttypeXmlNodeType.DocumentType
elementXmlNodeType.Element
entityreferenceXmlNodeType.EntityReference
processinginstructionXmlNodeType.ProcessingInstruction
significantwhitespaceXmlNodeType.SignificantWhitespace
textXmlNodeType.Text
whitespaceXmlNodeType.Whitespace

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0