{"title":"XmlDeclaration data type","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/xmldeclaration/xmldeclaration-data-type/","by":"JOP-AL","license":"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/xmldeclaration/xmldeclaration-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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/xmldeclaration/xmldeclaration-data-type","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Represents an XML declaration.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Static methods","slug":"static-methods","at":91,"chars":198},{"level":2,"title":"Instance methods","slug":"instance-methods","at":289,"chars":2257},{"level":2,"title":"Related information","slug":"related-information","at":2546,"chars":117}],"text":"> Version: _Available or changed with runtime version 1.0._\nRepresents an XML declaration.\n## Static methods\nThe following methods are available on the XmlDeclaration data type.\nMethod name|Description\nCreate(Text, Text, Text)<xmldeclaration-create-method>|Creates an XmlDeclaration node.\n## Instance methods\nThe following methods are available on instances of the XmlDeclaration data type.\nMethod name|Description\nAddAfterSelf(Any,...)<xmldeclaration-addafterself-method>|Adds the specified content immediately after this node.\nAddBeforeSelf(Any,...)<xmldeclaration-addbeforeself-method>|Adds the specified content immediately before this node.\nxmldeclaration-asxmlnode-method|Converts the node to an XmlNode.\nEncoding([Text])<xmldeclaration-encoding-method>|Gets or sets the encoding of the XML document.\nGetDocument(var XmlDocument)<xmldeclaration-getdocument-method>|Gets the XmlDocument for this node.\nGetParent(var XmlElement)<xmldeclaration-getparent-method>|Gets the parent XmlElement of this node.\nxmldeclaration-remove-method|Removes this node from its parent element.\nReplaceWith(Any,...)<xmldeclaration-replacewith-method>|Replaces this node with the specified content.\nSelectNodes(Text, var XmlNodeList)<xmldeclaration-selectnodes-string-xmlnodelist-method>|Selects a list of nodes matching the XPath expression.\nSelectNodes(Text, XmlNamespaceManager, var XmlNodeList)<xmldeclaration-selectnodes-string-xmlnamespacemanager-xmlnodelist-method>|Selects a list of nodes matching the XPath expression.\nSelectSingleNode(Text, var XmlNode)<xmldeclaration-selectsinglenode-string-xmlnode-method>|Selects the first XmlNode that matches the XPath expression.\nSelectSingleNode(Text, XmlNamespaceManager, var XmlNode)<xmldeclaration-selectsinglenode-string-xmlnamespacemanager-xmlnode-method>|Selects the first XmlNode that matches the XPath expression.\nStandalone([Text])<xmldeclaration-standalone-method>|Gets or sets the standalone property for this document.\nVersion([Text])<xmldeclaration-version-method>|Gets or sets the version property for this document.\nxmldeclaration-writeto-outstream-method|Serializes and saves the current node to the given variable.\nxmldeclaration-writeto-xmlwriteoptions-outstream-method|Serializes and saves the current node to the given variable.\nWriteTo(var Text)<xmldeclaration-writeto-text-method>|Serializes and saves the current node to the given variable.\nWriteTo(XmlWriteOptions, var Text)<xmldeclaration-writeto-xmlwriteoptions-text-method>|Serializes and saves the current node to the given variable.\n## Related information\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}