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

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia 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: Australia  
Updated March 12, 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 in ServiceNow's Configuration Data Management (CDM) enables efficient parsing of attribute key-value pairs from XML files into JSON format.
This functionality allows customers to upload configuration data from XML files into CDM and clearly identify each element's attributes within the CDM editor or list view.
Show full answer Show less  
Note that starting with the Washington D.C. release, DevOps Config is being prepared for deprecation and will be hidden on new instances, although it remains supported.

## Key Features

* Converts XML attributes and element text into JSON with a clear distinction: attributes use an **@** prefix on keys, and enclosing text uses a **#text** key.
* Upon importing XML, the parser transforms attributes and text content into JSON to enable easier review and validation within CDM.
* When exporting configuration data back to XML, CDM requires the use of the **@** prefix for attribute keys and **#text** keys for element text to preserve the original XML structure.

## Practical Application for ServiceNow Customers

* Import existing configuration data from XML files with accurate representation of element attributes as key-value pairs in JSON.
* Easily differentiate between XML attributes and config data elements inside CDM, enhancing visibility and validation during deployment preparation.
* Maintain fidelity of XML structure when exporting configuration data back to XML by correctly using the @ and #text key conventions.

## Example of XML to JSON Conversion

Attributes in XML are prefixed with **@** in JSON, and element text with both attributes is stored under **#text** . For instance, an XML element `<provider region="EMEA">ABCPay</provider>` converts to JSON as:

```
{ "provider": { "@region": "EMEA", "#text": "ABCPay" }}
```

## Next Steps

* Use this parsing mechanism when uploading or exporting configuration data in CDM to ensure data integrity and ease of management.
* Combine this understanding with related CDM features such as CSV parsing and config data node management for comprehensive configuration management.  
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:  
Starting with the Washington D.C. release, DevOps Config is being prepared for future deprecation. It will be hidden and no longer activated on new instances but will continue to be supported.
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/fI4gYiNoRrau~29INCo2Lg "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/uoHe0~WoJwfrtiVzG2Sp1g "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/jOaJ~OvoCo9A1zKwwKq6ng "Add the data structure to a new application that will accept the uploaded config data into appropriate nodes.")

