js read xml file
parser = new DOMParser();
xmlDoc = parser.parseFromString(<TEXT_TO_PARSE>,"text/xml");
js read xml file
parser = new DOMParser();
xmlDoc = parser.parseFromString(<TEXT_TO_PARSE>,"text/xml");
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);
}
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us