# XML to JSON Transformation

**URL:** <https://forum.alumio.com/t/xml-to-json-transformation/481>\
**Category:** Mappers\
**Created:** [March 2, 2023, 2:54pm UTC](https://forum.alumio.com/t/xml-to-json-transformation/481 "2023-03-02T14:54:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![abubakar](https://forum.alumio.com/letter_avatar_proxy/v4/letter/a/8491ac/32.png) [@abubakar](https://forum.alumio.com/u/abubakar)\
**Post date:** [March 2, 2023, 2:54pm UTC](https://forum.alumio.com/t/xml-to-json-transformation/481/1 "2023-03-02T14:54:58Z")

</div>

Hello @Alumio_Bot , i want to know more about this, i have used the value mapper → serialize xml, but my data is not transformed

---

<div class="post-metadata">

**Author:** ![Alumio\_Bot](https://forum.alumio.com/user_avatar/forum.alumio.com/alumio_bot/32/1824_2.png) [@Alumio\_Bot](https://forum.alumio.com/u/Alumio_Bot)\
**Post date:** [March 2, 2023, 2:56pm UTC](https://forum.alumio.com/t/xml-to-json-transformation/481/2 "2023-03-02T14:56:59Z")

</div>

Hey, Could this be what you are looking for?

> [@How to map with Serialize: XML](https://forum.alumio.com/t/how-to-map-with-serialize-xml/356):
>
> Table of contents Use case 1 Use case 2 Use Case 1 Basically, Alumio uses the JSON data type in every transformer. While some systems sometimes only accept XML, you can convert the JSON data into XML by using the Value Mapper transformer and the Serialize: XML mapper. Guide 1. Set attributes to an element Please have a look at the below XML data. \<?xml version="1.0"?\> \<data attr1="value 1" attr2="value 2"\> \<content\>this is content\</content\> \</data\> …

---

<div class="post-metadata">

**Author:** ![abubakar](https://forum.alumio.com/letter_avatar_proxy/v4/letter/a/8491ac/32.png) [@abubakar](https://forum.alumio.com/u/abubakar)\
**Post date:** [March 2, 2023, 3:09pm UTC](https://forum.alumio.com/t/xml-to-json-transformation/481/3 "2023-03-02T15:09:12Z")

</div>

mine does not get transformed to json, this is from the incoming configuration

---

<div class="post-metadata">

**Author:** ![Alumio\_Bot](https://forum.alumio.com/user_avatar/forum.alumio.com/alumio_bot/32/1824_2.png) [@Alumio\_Bot](https://forum.alumio.com/u/Alumio_Bot)\
**Post date:** [March 2, 2023, 3:17pm UTC](https://forum.alumio.com/t/xml-to-json-transformation/481/4 "2023-03-02T15:17:28Z")

</div>

Oh are you trying to get from XML to JSON?  
Then you’d need to deserialize.

> [@How to map with Deserialize](https://forum.alumio.com/t/how-to-map-with-deserialize/266):
>
> Table Of Contents Use case Guide Video guide Use case Deserialization of data can be defined as the process of transforming a string into a data object of a distinct type. The following data types are supported by the Alumio Deserialize mapper- JSON, NDJSON, XML, cXML, YAML or encode URL. Note: When using Compressed Deserializer, the following file formats are supported in Alumio: .tar.gz, .gz, zip. For instance, let’s imagine a scenario where XML data is retrieved as a string and you have t…

---

<div class="post-metadata">

**Author:** ![abubakar](https://forum.alumio.com/letter_avatar_proxy/v4/letter/a/8491ac/32.png) [@abubakar](https://forum.alumio.com/u/abubakar)\
**Post date:** [March 2, 2023, 3:38pm UTC](https://forum.alumio.com/t/xml-to-json-transformation/481/5 "2023-03-02T15:38:48Z")

</div>

Okay let try this then

---

<div class="post-metadata">

**Author:** ![abubakar](https://forum.alumio.com/letter_avatar_proxy/v4/letter/a/8491ac/32.png) [@abubakar](https://forum.alumio.com/u/abubakar)\
**Post date:** [March 2, 2023, 4:44pm UTC](https://forum.alumio.com/t/xml-to-json-transformation/481/6 "2023-03-02T16:44:19Z")

</div>

thank you @Alumio_Bot , one more thing, i am getting this error message now : **xmlns: URI fashionmaster is not absolute**

---

<div class="post-metadata">

**Author:** ![abubakar](https://forum.alumio.com/letter_avatar_proxy/v4/letter/a/8491ac/32.png) [@abubakar](https://forum.alumio.com/u/abubakar)\
**Post date:** [March 2, 2023, 4:45pm UTC](https://forum.alumio.com/t/xml-to-json-transformation/481/7 "2023-03-02T16:45:59Z")

</div>

Here is the xml : [https://codebeautify.org/xmltojson/y23e7d624](https://codebeautify.org/xmltojson/y23e7d624)

---

<div class="post-metadata">

**Author:** ![Gugi](https://forum.alumio.com/user_avatar/forum.alumio.com/gugi/32/236_2.png) [@Gugi](https://forum.alumio.com/u/Gugi)\
**Post date:** [March 3, 2023, 9:59am UTC](https://forum.alumio.com/t/xml-to-json-transformation/481/8 "2023-03-03T09:59:35Z")

</div>

Hi @abubakar

Is “fashionmaster” the actual xmlns for the DataTable root element?

 ![image](https://alumio-forum.s3.dualstack.eu-central-1.amazonaws.com/uploads/original/1X/cd48a0105f0c5b1b4175bcbf761dd4190cef46e3.png)

An xmlns (XML Namespace) should be identified by URI reference ([Namespaces in XML 1.0 (Third Edition)](https://www.w3.org/TR/xml-names/#sec-namespaces)).

I tried to put the XML file in [a Postman Mock server](https://aee8dae8-bc11-482e-9468-b3ea16270bdf.mock.pstmn.io/test) and updated the xmlns of the DataTable element to an URI, i.e., [https://www.fashionmaster.co.uk](https://www.fashionmaster.co.uk) and Alumio can decode the XML.

 ![image](https://alumio-forum.s3.dualstack.eu-central-1.amazonaws.com/uploads/original/1X/76df2dffcc5a1fce7b8ec09a142fb8c80c87845c.png)

---

<div class="post-metadata">

**Author:** ![abubakar](https://forum.alumio.com/letter_avatar_proxy/v4/letter/a/8491ac/32.png) [@abubakar](https://forum.alumio.com/u/abubakar)\
**Post date:** [March 14, 2023, 5:09am UTC](https://forum.alumio.com/t/xml-to-json-transformation/481/9 "2023-03-14T05:09:43Z")

</div>

Thank you, your solution is correct

---

<div class="post-metadata">

**Author:** ![Alumio\_Bot](https://forum.alumio.com/user_avatar/forum.alumio.com/alumio_bot/32/1824_2.png) [@Alumio\_Bot](https://forum.alumio.com/u/Alumio_Bot)\
**Post date:** [March 14, 2023, 10:01am UTC](https://forum.alumio.com/t/xml-to-json-transformation/481/10 "2023-03-14T10:01:08Z")

</div>

@abubakar  
You can select the answer that turned out to be the solution.  
1.  
 ![image](https://alumio-forum.s3.dualstack.eu-central-1.amazonaws.com/uploads/original/1X/829c0b6ea3dc6bd83c372c7688955a50137704df.png)  
2.  
 ![image](https://alumio-forum.s3.dualstack.eu-central-1.amazonaws.com/uploads/original/1X/5dda78206c127a185e4befb50a2ff7d06ab21ac1.png)

This will also help others in the future.

---

<div class="post-metadata">

**Author:** ![abubakar](https://forum.alumio.com/letter_avatar_proxy/v4/letter/a/8491ac/32.png) [@abubakar](https://forum.alumio.com/u/abubakar)\
**Post date:** [March 14, 2023, 8:25pm UTC](https://forum.alumio.com/t/xml-to-json-transformation/481/11 "2023-03-14T20:25:30Z")

</div>

thanks for that, i have done that
