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
- prefix
Type: System.String
The Prefix
- uri
Type: System.String
The Uri
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | Thrown if the prefix is already used in the current node. |