react-xml
install
npm i react-xml
usage
import react from 'react'import renderToStaticXML from 'react-xml' const id = 'E0000001'const name = 'John Smith' const element = <emp:employee ="urn:corp:emp"> <emp:person = ="urn:corp:work"> <emp:name>name</emp:name> </emp:person> </emp:employee> const xml = console // <emp:employee xmlns:emp="urn:corp:emp">// <emp:person work:empId="E0000001" xmlns:work="urn:corp:work">// <emp:name>John Smith</emp:name>// </emp:person>// </emp:employee>