Horje
Convert xml to json Code Example
Convert xml to json
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Xml;
using System.Xml.Serialization;

namespace create_plugin
{
    class Program
    {
        static void Main(string[] args)
        {
             string xml = null;
            using (WebClient wc = new WebClient())
            {
               xml = wc.DownloadString("https://www.cbar.az/currencies/15.03.2022.xml");
            }
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(xml);

            string json = JsonConvert.SerializeXmlNode(doc);
            Console.WriteLine(json);
        }
    }
}




Csharp

Related
TextBox filling in C# Code Example TextBox filling in C# Code Example
c# create empty file if not exists Code Example c# create empty file if not exists Code Example
tempdata serializer cannot erorr Code Example tempdata serializer cannot erorr Code Example
c# read single key Code Example c# read single key Code Example
virtual list entity framework Code Example virtual list entity framework Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8