<h2>Exporting and importing data via XML</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2025" /><meta name="DC.rights.owner" content="(C) Copyright 2025" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="concept" /><meta name="DC.title" content="Exporting and importing data via XML" /><meta name="abstract" content="Migrate data from one instance to another by exporting and importing XML files." /><meta name="description" content="Migrate data from one instance to another by exporting and importing XML files." /><meta name="DC.subject" content="XML Files, exporting, importing" /><meta name="keywords" content="XML Files, exporting, importing" /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2023-08-03" /><meta name="DC.date.modified" content="2024-02-01" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="c_ExportAndImportXMLFiles" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Exporting and importing data via XML</title></head><body id="c_ExportAndImportXMLFiles"> <h1 class="title topictitle1" id="ariaid-title1">Exporting and importing data via XML</h1> <div class="body conbody"><p class="shortdesc">Migrate data from one instance to another by exporting and importing XML files.</p> <div class="section" id="c_ExportAndImportXMLFiles__section_ytf_51m_31c"><h2 class="title sectiontitle">Key benefits</h2> <div class="p"><ul class="ul" id="c_ExportAndImportXMLFiles__ul_s5s_51m_31c"><li class="li">Directly export records as XML from any list or form.</li><li class="li">Transfer all fields and values exactly from one instance to another.</li><li class="li">Perform unscheduled data imports as needed.</li><li class="li">Save time by not building import sets or transform maps.</li></ul> </div> </div> <div class="section" id="c_ExportAndImportXMLFiles__section_xwl_fbm_31c"><h2 class="title sectiontitle">Use cases</h2> <ul class="ul" id="c_ExportAndImportXMLFiles__ul_sxt_j25_31c"><li class="li">Export smaller batches of records on an infrequent basis by exporting and importing data via XML.</li><li class="li">Export and import data using XML files for records created in a development instance that must be migrated with an update set as part of a migration procedure. Examples of these records include lookup tables, unit test records, and other information required to support production. Typically, this information is only migrated once and the overhead of an import set is not justified.</li></ul> </div> <div class="section" id="c_ExportAndImportXMLFiles__section_czv_ch1_j1c"><h2 class="title sectiontitle">Important considerations</h2> <div class="p"><ul class="ul" id="c_ExportAndImportXMLFiles__ul_uzk_hh1_j1c"><li class="li">The XML export preserves all record field values including system generated field values such as:<ul class="ul" id="c_ExportAndImportXMLFiles__ul_hnt_hh1_j1c"><li class="li">Sys ID</li><li class="li">Creation date</li><li class="li">Update date</li></ul> </li><li class="li">Image field data is not preserved when exporting to XML.</li><li class="li">The XML import directly inserts records into the target table. During the import the system:<ul class="ul" id="c_ExportAndImportXMLFiles__ul_dx4_jh1_j1c"><li class="li">Ignores any business rules that normally apply to the table.</li><li class="li">Does not provide any opportunity to transform incoming data.</li><li class="li">Automatically matches a reference field's display value to the local Sys ID for some tables.</li></ul> </li><li class="li">Data export and import via XML is helpful for copying records from one system to another but does not remove the need to know the relationships between tables. If you need validate or transform data or reconcile the sys ID values of reference fields, use an XML import set instead. See <a class="xref" href="../administer/export-sets/concept/c_ExportSets.html" target="_blank" rel="noopener noreferrer">Export sets</a>.</li></ul> </div> </div> </div> </body></html></div>