• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class XmlExtensions

The XmlExtensions class allows you to write more efficient code to manage Xml documents.

Inheritance
System.Object
XmlExtensions
Namespace: DotNetNuke.Common.Utilities
Assembly: DotNetNuke.dll
Syntax
public static class XmlExtensions : object

Methods

| Improve this Doc View Source

AddAttribute(XmlNode, String, String, String, String)

Adds an attribute to an XmlNode using the specified namespace.

Declaration
public static XmlNode AddAttribute(this XmlNode node, string attributeName, string attributeValue, string namespaceUri, string namespaceAbbr)
Parameters
Type Name Description
XmlNode node

The node to add the attribtue to.

System.String attributeName

Name of the attribute without the namespace abbreviation prefix.

System.String attributeValue

The attribute value.

System.String namespaceUri

The namespace URI.

System.String namespaceAbbr

The namespace abbreviation.

Returns
Type Description
XmlNode

The node the attribute was added to.

| Improve this Doc View Source

AddAttribute(XmlNode, String, String)

Adds an attribute to the specified node.

Declaration
public static XmlNode AddAttribute(this XmlNode node, string attributeName, string attributeValue)
Parameters
Type Name Description
XmlNode node

The node to add the attribute to.

System.String attributeName

Name of the attribute.

System.String attributeValue

The attribute value.

Returns
Type Description
XmlNode

The node the attribute was added to.

| Improve this Doc View Source

AddElement(XmlNode, String, String, Boolean, String, String)

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

Declaration
public static XmlNode AddElement(this XmlNode node, string elementName, string elementValue, bool useCData, string namespaceUri, string namespaceAbbr)
Parameters
Type Name Description
XmlNode node

The node to add the element to.

System.String elementName

Name of the element (without the abbreviated prefix).

System.String elementValue

The element value.

System.Boolean useCData

if set to true use a CData encapsulation.

System.String namespaceUri

The namespace URI.

System.String namespaceAbbr

The namespace abbreviation.

Returns
Type Description
XmlNode

The added node.

| Improve this Doc View Source

AddElement(XmlNode, String, String, Boolean)

Adds an element to the specified XmlNode.

Declaration
public static XmlNode AddElement(this XmlNode node, string elementName, string elementValue, bool useCData)
Parameters
Type Name Description
XmlNode node

The node to add the element to.

System.String elementName

Name of the element.

System.String elementValue

The element value.

System.Boolean useCData

if set to true use a CData encapsulation.

Returns
Type Description
XmlNode

The added element.

| Improve this Doc View Source

AddElement(XmlNode, String, String)

Adds an element to the specified XmlNode.

Declaration
public static XmlNode AddElement(this XmlNode node, string elementName, string elementValue)
Parameters
Type Name Description
XmlNode node

The node to add the element to.

System.String elementName

Name of the element.

System.String elementValue

The element value.

Returns
Type Description
XmlNode

The added element.

| Improve this Doc View Source

RemoveChildNode(XmlNode, String)

Remove the child node with the provided name.

Declaration
public static void RemoveChildNode(this XmlNode node, string childNodeName)
Parameters
Type Name Description
XmlNode node

The parent node.

System.String childNodeName

The child node name.

  • View Source
Back to top by the community, for the community... #DNNCMS