Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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);
        }
    }
}
Comment

xml to json

xml to json
Comment

xml to json

xml to json
Comment

xml to json

xml to json
Comment

xml to json

xml to json
Comment

xml to json

xml to json
Comment

PREVIOUS NEXT
Code Example
Csharp :: ontriggerenter unity not working 
Csharp :: c# how to initialize an array 
Csharp :: c# distinct comparer multiple properties 
Csharp :: Transpose Matrix C Sharp 
Csharp :: using statement c# 
Csharp :: delete all fields that start with mongo 
Csharp :: How can I get my stripe customer ID? 
Csharp :: how to filter a list in c# 
Csharp :: c# code snippets 
Csharp :: how to create a string in c# 
Csharp :: flyt wordpress fra localserver 
Csharp :: error cs1585 unity 
Csharp :: unity image button 
Csharp :: Unity Input Key Message 
Csharp :: system.componentmodel.dataannotations hide field 
Csharp :: discord bot c# how to refresh message 
Csharp :: degree between two points latitude longitude c# 
Csharp :: c# windows forms rtc 
Csharp :: DisplayUnitType revit api 
Csharp :: c# pull request 
Csharp :: data types of document in asp dot net frame work 
Csharp :: c# UserControl make background transparent 
Csharp :: Razor break/continue in loop 
Csharp :: unity update not called 
Csharp :: jtoken null or exists c# 
Csharp :: how to add onclick event dynamically in unity 
Csharp :: creating an object 
Csharp :: Expression And Filter 
Csharp :: Unity mousetoterrainposition 
Csharp :: händelsereportage 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =