Convert simple JSON / XML to XML with namespaces in C# .NET

AmandaB

New Member
What is the best way to convert json (or straightforward XML) to XML with namespaces (or with specific schema), without using strongly typed classes (C#)? (Using XSD, XSLT, template engine or other text based engine).What is the most effective way (resources / performance)?For example, to take the following object in json - string:\[code\]{ 'item': { 'name': 'item #1' 'code': 'itm-123' 'image': { '@url': 'http://www.foo.com/bar.jpg' } }}\[/code\]And convert it to:\[code\]<foo:item> <foo:name>item #1</foo:name> <foo:code>itm-123</foo:code> <foo:image url="http://www.foo.bar"/></foo:item>\[/code\](The object can be more complex than the example above)thanks
 
Back
Top