I have the below XML output generated using a SQL Server query (added in the rextester link):
<Main>
<ID>1001</ID>
<details>
<name>John</name>
<age>12</age>
</details>
</Main>
I want to know how to add a namespace xmlns:json="http://www.samplenamespace.com/json" to the Main node.
Desired output:
<Main xmlns:json="http://www.samplenamespace.com/json">
<ID>1001</ID>
<details>
<name>John</name>
<age>12</age>
</details>
</Main>
Rextester link: http://rextester.com/OQZH6668
Any help!?