Tag
#xml
3 snippets and 2 tools.
- Snippet SQL Server: Convert Between XML and JSON Turn XML into JSON with nodes() and FOR JSON, and JSON into XML with OPENJSON and FOR XML PATH, keeping nested rows nested.
- Snippet SQL Server: Query Large XML Documents Without Timeouts Why shredding a big XML file with nodes() can take minutes, and the fixes that bring it back to seconds: no parent axis, full paths, text(), shredding once.
- Snippet SQL Server: Turn XML Into Rows with nodes() Shred an XML document into rows and typed columns with nodes() and value(), including child rows, attributes and namespaces.
- Tool XML to JSON Converter Convert XML to JSON and JSON back to XML, with attributes, repeated elements and namespaces handled the same way in both directions.
- Tool XML to nodes() Query Generator Paste a sample XML document and get a SQL Server nodes()/value() query, with column types inferred from the data and child rows shredded with CROSS APPLY.