Adds an element to the specified XmlNode using the specified namespace.

Namespace: DotNetNuke.Common.Utilities
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static XmlNode AddElement(
	this XmlNode node,
	string elementName,
	string elementValue,
	bool useCData,
	string namespaceUri,
	string namespaceAbbr
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function AddElement ( 
	node As XmlNode,
	elementName As String,
	elementValue As String,
	useCData As Boolean,
	namespaceUri As String,
	namespaceAbbr As String
) As XmlNode

Parameters

node
Type: System.Xml..::..XmlNode
The node to add the element to.
elementName
Type: System..::..String
Name of the element (without the abbreviated prefix).
elementValue
Type: System..::..String
The element value.
useCData
Type: System..::..Boolean
if set to true use a CData encapsulation.
namespaceUri
Type: System..::..String
The namespace URI.
namespaceAbbr
Type: System..::..String
The namespace abbreviation.

Return Value

The added node

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XmlNode. When you use instance method syntax to call this method, omit the first parameter. For more information, see [b8020aae-374d-46a9-bcb7-8cc2390b93b6] or [175ce3ff-9bbf-4e64-8421-faeb81a0bb51].

See Also