skip to Main Content

SQL Server: convert JSON variable to XML

I have a variable which contains a single JSON object like declare @jsonVar nvarchar(max) = N'{"key1":"value1","key2":"value2"}'; I need to convert it to XML and get something like this (or without 'root' at all) <root> <key1>value1</key1> <key2>value2</key2> </root> The solution should…

VIEW QUESTION

PHP – How to identify and count only parent elements of a very large XML efficiently

I have a very large xml file with the following format (this is a very small snip of two of the sections). <?xml version="1.0" standalone="yes"?> <LaunchBox> <Game> <Name>Violet</Name> <ReleaseYear>1985</ReleaseYear> <MaxPlayers>1</MaxPlayers> <Platform>ZiNc</Platform> </Game> <Game> <Name>Wishbringer</Name> <ReleaseYear>1985</ReleaseYear> <MaxPlayers>1</MaxPlayers> <Platform>ZiNc</Platform> </Game> <Platform> <Name>3DO…

VIEW QUESTION

C# Problem deserialize XML into JSON array

I have the following XML <table> <name>Table 1</name> <headers> <header>Header 1</header> <header>Header 2</header> </headers> <data> <row> <row_item>Item 1</row_item> <row_item>Item 2</row_item> </row> <row> <row_item>Item 3</row_item> <row_item>Item 4</row_item> </row> </data> </table> Now I can deserialize this easy enough using the built in…

VIEW QUESTION
Back To Top
Search