---
sourceDocument: Brazil IT Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/it-service-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil IT Service Management

ft:clusterId :

    - itsm

bundleId :

    - itsm

workflow :

    - Technology


---

# Parsing of XML files in CDM

# Parsing of XML files in CDM {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Parsing of XML files in CDM

The CDM XML parser facilitates the import and export of configuration data between XML files and the CDM (Configuration Data Management) system by accurately parsing attribute key-value pairs.
This enables ServiceNow customers to upload existing XML-based config data into CDM with clear differentiation of attributes and element text, and to export JSON-formatted config data back into XML while preserving attribute structure.
Show full answer Show less  
Note that DevOps Config is deprecated and no longer supported for new activations.

## Key Features

* **XML to JSON Parsing on Import:** Converts XML element attributes into JSON keys prefixed with '@' and element text into a '#text' key when both attributes and text coexist, allowing easy identification of attributes and text in CDM editor and list views.
* **JSON to XML Conversion on Export:** Requires JSON keys representing attributes to be prefixed with '@' and the presence of '#text' keys for element text, ensuring accurate re-construction of XML attributes and text during export.
* **Validation and Differentiation:** Supports validation of imported CSV data with attributes and helps clearly separate attributes from configuration items in the CDM interface.

## Practical Application

When uploading XML files into CDM, attributes such as `type="B2C"` in XML become `"@type": "B2C"` in JSON, and text content within elements with attributes is represented with a `"#text"` key. This structured parsing enables ServiceNow customers to view and manage configuration data attributes distinctly within CDM.

For exporting back to XML, customers must ensure that attribute keys retain the '@' prefix and include '#text' keys where necessary so that the exported XML maintains the original attribute and text format.

## Related Tasks

* Uploading configuration data into CDM
* Adding nodes with config data to the CDM application
* Parsing CSV files in CDM (related functionality)  
The CDM XML parser enables the parsing of attribute key-value pairs in XML files, so when you upload config data from an XML file into CDM, you can easily identify the attributes of each element in the CDM editor or list view.  
Important:  
DevOps Config is now deprecated and no longer supported or available for new activation.
This parsing of attribute key-value pairs from an XML file to a JSON format in CDM helps you in the following ways:

* Uploading existing config data from an XML file, including the attributes of XML elements as appropriate key-value pairs in JSON.
* Differentiating attributes from the config data items easily in the CDM editor.
* Validating imported CSV data with attributes in CDM for deployment.
* Converting attribute key-value pairs in JSON format as XML element attributes in XML file.
{#cdm-parsing-xml-file__ul_lyl_hzp_wxb}

## Parsing of XML to JSON during import {#cdm-parsing-xml-file__section_czt_lkv_vxb}

When you import an XML file to upload your config data into CDM, the parser converts attributes and enclosing text in XML elements to the JSON format as follows:

* Adds the @ prefix to all key names corresponding to attributes of XML elements.
* Adds a #text key for the enclosing text value of XML elements that have both attributes and enclosing text.
{#cdm-parsing-xml-file__ul_wy5_zkv_vxb}These options help in identifying attributes and enclosing text in the Editor panel and List view while reviewing the config data.  
The following example shows how the conversion looks between XML and JSON formats:

XML format
:

        <app>
             <components>
                   <paymentService type="B2C">
                             <provider region="EMEA">ABCPay</provider>
                             <service>XYZPay</service>
                   </paymentService>
             </components>
        <app>

JSON format
:

        {
           "app" : {
                 "components" : {
                         "paymentService" : { //key-value pair for XML elements with attributes
                                  "@type" : "B2C", // @ prefix for attribute
                                  "provider" : {
                                        "@region" : "EMEA", // @ prefix to key name for attribute
                                        "#text" : "ABCPay"  // #text key name for enclosing text
                                    },
                          "service" : "XYZPay" //key-value pair for XML elements without attributes
                          }
                   }
           }
        }

## Parsing of JSON to XML during export {#cdm-parsing-xml-file__section_nqj_pqj_wxb}

To keep the XML attributes and enclosing text in their original format when exporting the config data to an XML file format, you must update the config data as follows:

* Add the @ prefix to all key names to make them parse as attributes of XML elements.
* Add keys named #text to CDIs that should be parsed as the enclosing text value of XML elements, when both attributes and enclosing text are present.
{#cdm-parsing-xml-file__ul_jxq_fmv_vxb}
**Related concepts**   

* [Uploading your config data](https://www.servicenow.com/docs/Ekm~0P4BzGLbVnBOhfy6yA "You first create a new CDM application structure and then upload the existing config data into the structure.")
* [Parsing of CSV files in CDM](https://www.servicenow.com/docs/Tw~qdyr4cp6X7TEiMYzaGA "The CDM CSV parser enables parsing of data in CSV files, so when you upload config data from a Comma-Separated Values (CSV) file into CDM, you can easily identify the data format attributes and config data in the CDM editor or list view.")  
**Related tasks**   

* [Add nodes with config data to CDM application](https://www.servicenow.com/docs/j8J2~c1qGqDn_CrEC21KiQ "Add the data structure to a new application that will accept the uploaded config data into appropriate nodes.")

