Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

get xml from URL

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

PREVIOUS NEXT
Code Example
Csharp :: c# square symbol 
Csharp :: quaternion to euler 
Csharp :: c# reverse a string for loop 
Csharp :: matrix transpose c# 
Csharp :: c# nunit test case 
Csharp :: exception is null c# 
Csharp :: if else c# 
Csharp :: Proxy in Config 
Csharp :: lightbox 
Csharp :: action c# 
Csharp :: Implementing video array in unity 
Csharp :: Entity framwork update parent entity added new sub entity 
Csharp :: access server name or ip c# get 
Csharp :: mongodb custom IIdGenerator 
Csharp :: remove numericUpDown white space 
Csharp :: c# insert today datetime 
Csharp :: wpf button to return to last window 
Csharp :: setxkbmap 
Csharp :: windows forms change double buffer during runtime 
Csharp :: how to assign 2d physics material through script 
Csharp :: how to input message ox in c# 
Csharp :: pyqt send message to another instance 
Csharp :: angular === vs == 
Csharp :: how to controller request in c# 
Csharp :: class merging 
Csharp :: How do I remove a String Array from a List in C# 
Csharp :: uncapitalize string c# 
Csharp :: unknown discriminator value mongodb 
Csharp :: mydata api .net 
Csharp :: how to detect when a gameobject has exited a trigger c# 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =