Freigeben über


OpenXmlElement.AddNamespaceDeclaration Method

Adds a namepace declaration to the current node.

Namespace:  DocumentFormat.OpenXml
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Sub AddNamespaceDeclaration ( _
    prefix As String, _
    uri As String _
)
'Usage
Dim instance As OpenXmlElement
Dim prefix As String
Dim uri As String

instance.AddNamespaceDeclaration(prefix, _
    uri)
public void AddNamespaceDeclaration(
    string prefix,
    string uri
)

Parameters

Exceptions

Exception Condition
InvalidOperationException

Thrown if the prefix is already used in the current node.

See Also

Reference

OpenXmlElement Class

OpenXmlElement Members

DocumentFormat.OpenXml Namespace