XdmType.Document Method (string, string, XmlSchemaType, bool)XdmType.Document Method (String, String, XmlSchemaType, Boolean)XdmType::Document Method (String^, String^, XmlSchemaType^, bool)

Returns an XdmTypeXdmTypeXdmType instance corresponding to the document type with element content with the specified name and type annotation.

Syntax

Public Shared Function Document( _
    elementLocalName As String, _
    elementNamespace As String, _
    elementTypeAnnotation As System.Xml.Schema.XmlSchemaType, _
    nillable As Boolean _
) As XdmType
public static XdmType Document(
    string elementLocalName,
    string elementNamespace,
    System.Xml.Schema.XmlSchemaType elementTypeAnnotation,
    bool nillable
)
public:
static XdmType^ Document(
    String^ elementLocalName, 
    String^ elementNamespace, 
    System.Xml.Schema::XmlSchemaType^ elementTypeAnnotation, 
    bool nillable
)
 

Parameters

elementLocalName

Type: System.StringSystem.StringSystem::String^

The local name of the root element of this document.

elementNamespace

Type: System.StringSystem.StringSystem::String^

The namespace of the root element of this document.

elementTypeAnnotation

Type: System.Xml.Schema.XmlSchemaTypeSystem.Xml.Schema.XmlSchemaTypeSystem.Xml.Schema::XmlSchemaType^

The type annotation of the root element of this document type.

nillable

Type: System.BooleanSystem.BooleanSystem::Boolean

A boolean value indicating whether the root element is nillable.

Return Value

Type: XmlPrime.XdmTypeXmlPrime.XdmTypeXmlPrime::XdmType^

An XdmTypeXdmTypeXdmType instance representing the document type with element content with the specified name and type annotation.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException elementLocalName, elementNamespace or elementTypeAnnotation is null a null reference (Nothing in Visual Basic) nullptr.
ArgumentExceptionArgumentExceptionArgumentExceptionelementLocalName is not a valid xs:NCName value.

Remarks

This corresponds to the XPath 2.0 type document-node(element(elementName, elementTypeAnnotation)), or document-node(element(elementName, elementTypeAnnotation?)) if nillable is trueTruetrue, where elementName has local name and namespace specified by elementLocalName and elementNamespace.