# XmlDocumentType data type
> Version: _Available or changed with runtime version 1.0._
Represents an XML document type.
## Static methods
The following methods are available on the XmlDocumentType data type.
Method name|Description
Create(Text)<xmldocumenttype-create-string-method>|Creates an XmlDocumentType node.
Create(Text, Text)<xmldocumenttype-create-string-string-method>|Creates an XmlDocumentType node.
Create(Text, Text, Text)<xmldocumenttype-create-string-string-string-method>|Creates an XmlDocumentType node.
Create(Text, Text, Text, Text)<xmldocumenttype-create-string-string-string-string-method>|Creates an XmlDocumentType node.
## Instance methods
The following methods are available on instances of the XmlDocumentType data type.
Method name|Description
AddAfterSelf(Any,...)<xmldocumenttype-addafterself-method>|Adds the specified content immediately after this node.
AddBeforeSelf(Any,...)<xmldocumenttype-addbeforeself-method>|Adds the specified content immediately before this node.
xmldocumenttype-asxmlnode-method|Converts the node to an XmlNode.
GetDocument(var XmlDocument)<xmldocumenttype-getdocument-method>|Gets the XmlDocument for this node.
GetInternalSubset(var Text)<xmldocumenttype-getinternalsubset-method>|Gets the internal subset for this Document Type Definition (DTD).
GetName(var Text)<xmldocumenttype-getname-method>|Gets the name for this Document Type Definition (DTD).
GetParent(var XmlElement)<xmldocumenttype-getparent-method>|Gets the parent XmlElement of this node.
GetPublicId(var Text)<xmldocumenttype-getpublicid-method>|Gets the public identifier for this Document Type Definition (DTD).
GetSystemId(var Text)<xmldocumenttype-getsystemid-method>|Gets the system identifier for this Document Type Definition (DTD).
xmldocumenttype-remove-method|Removes this node from its parent element.
ReplaceWith(Any,...)<xmldocumenttype-replacewith-method>|Replaces this node with the specified content.
SelectNodes(Text, var XmlNodeList)<xmldocumenttype-selectnodes-string-xmlnodelist-method>|Selects a list of nodes matching the XPath expression.
SelectNodes(Text, XmlNamespaceManager, var XmlNodeList)<xmldocumenttype-selectnodes-string-xmlnamespacemanager-xmlnodelist-method>|Selects a list of nodes matching the XPath expression.
SelectSingleNode(Text, var XmlNode)<xmldocumenttype-selectsinglenode-string-xmlnode-method>|Selects the first XmlNode that matches the XPath expression.
SelectSingleNode(Text, XmlNamespaceManager, var XmlNode)<xmldocumenttype-selectsinglenode-string-xmlnamespacemanager-xmlnode-method>|Selects the first XmlNode that matches the XPath expression.
SetInternalSubset(Text)<xmldocumenttype-setinternalsubset-method>|Sets the internal subset for this Document Type Definition (DTD).
SetName(Text)<xmldocumenttype-setname-method>|Sets the name for this Document Type Definition (DTD).
SetPublicId(Text)<xmldocumenttype-setpublicid-method>|Sets the public identifier for this Document Type Definition (DTD).
SetSystemId(Text)<xmldocumenttype-setsystemid-method>|Sets the system identifier for this Document Type Definition (DTD).
xmldocumenttype-writeto-outstream-method|Serializes and saves the current node to the given variable.
xmldocumenttype-writeto-xmlwriteoptions-outstream-method|Serializes and saves the current node to the given variable.
WriteTo(var Text)<xmldocumenttype-writeto-text-method>|Serializes and saves the current node to the given variable.
WriteTo(XmlWriteOptions, var Text)<xmldocumenttype-writeto-xmlwriteoptions-text-method>|Serializes and saves the current node to the given variable.
## Related information
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/xmldocumenttype/xmldocumenttype-data-type, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/xmldocumenttype/xmldocumenttype-data-type/
