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

System.Xml.XmlDocument.CreateNode Method

Creates an System.Xml.XmlNode instance. [Edit]

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

Parameters

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

Returns

An System.Xml.XmlNode instance as indicated by the parameters. [Edit]

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
[Edit]

Requirements

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