# Xmlport data type
> Version: _Available or changed with runtime version 1.0._
XmlPorts are used to export or import data between an external source and a Microsoft Dynamics Business Central database.
## Static methods
The following methods are available on the Xmlport data type.
Method name|Description
Export(Integer, var OutStream [, var Record])<xmlport-export-method>|Creates an XML data stream (XML document) and sends it to a chosen destination.
Import(Integer, var InStream [, var Record])<xmlport-import-method>|Reads and parses an incoming XML data stream (XML document).
Run(Integer [, Boolean] [, Boolean] [, var Record])<xmlport-run-method>|Loads and executes the XmlPort that you specify.
## Instance methods
The following methods are available on instances of the Xmlport data type.
Method name|Description
xmlportinstance-break-method|Exits from a loop or a trigger in a data item trigger of a report or XmlPort.
xmlportinstance-breakunbound-method|Exits from a loop on records in an XmlPort trigger.
xmlportinstance-currentpath-method|Returns the CurrentPath for a given node, used when exporting an XmlPort.
xmlportinstance-export-method|Creates an XML data stream (XML document) and sends it to a chosen destination.
FieldDelimiter([Text])<xmlportinstance-fielddelimiter-method>|Gets and sets the FiledDelimiter used when running, importing or exporting the XmlPort.
FieldSeparator([Text])<xmlportinstance-fieldseparator-method>|Gets and sets the FieldSeparator used when running, importing or exporting the XmlPort.
Filename([Text])<xmlportinstance-filename-method>|Gets the current value of the FileName Property of an XmlPort and sets this property to a new value.
xmlportinstance-import-method|Reads and parses an incoming XML data stream (XML document).
ImportFile([Boolean])<xmlportinstance-importfile-method>|Gets or sets the ImportFile property.
xmlportinstance-quit-method|Aborts the processing of a report or XmlPort.
RecordSeparator([Text])<xmlportinstance-recordseparator-method>|Gets and sets the RecordSeparator used when running, importing or exporting the XmlPort.
xmlportinstance-run-method|Loads and executes the XmlPort that you specify.
SetDestination(var OutStream)<xmlportinstance-setdestination-method>|Sets the destination OutStream of the XmlPort.
SetSource(var InStream)<xmlportinstance-setsource-method>|Sets the source InStream of the XmlPort.
SetTableView(var Record)<xmlportinstance-settableview-method>|Applies the table view on the current record as the table view for the page, report, or XmlPort.
xmlportinstance-skip-method|Skips the current iteration of the current report or XmlPort.
TableSeparator([Text])<xmlportinstance-tableseparator-method>|Gets and sets the TableSeparator used when running, importing or exporting the XmlPort.
xmlportinstance-textencoding-method|Gets and sets the TextEncoding used when running, importing or exporting the XmlPort.
## Related information
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>
../../devenv-xmlport-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/xmlport/xmlport-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/xmlport/xmlport-data-type/
