Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
MBARK T3STO committed Jan 14, 2021
1 parent 9962260 commit 787eed0
Showing 1 changed file with 39 additions and 14 deletions.
53 changes: 39 additions & 14 deletions MBXml/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,49 @@ static async Task Main(string[] args)
Console.WriteLine("Wait...");

//var Doc = await Importer.ImportAsync(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\XXX.xml");
var Doc = await Importer.ImportAsync("https://ia801505.us.archive.org/17/items/xxx_20210114/xxx.xml");

var R = (from x in Doc.Root.Elements("Order")
select new
{
ID = x.Element("ID").Value,
Client = x.Element("Client").Value,
Product = x.Element("Product").Value,
Total = x.Element("Total").Value
});
//var R = (from x in Doc.Root.Elements("Order")
// select new
// {
// ID = x.Element("ID").Value,
// Client = x.Element("Client").Value,
// Product = x.Element("Product").Value,
// Total = x.Element("Total").Value
// });


foreach (var o in R)
{
Console.WriteLine($"{o.ID}, {o.Client}, {o.Product}, {o.Total}");
}
//foreach (var o in R)
//{
// Console.WriteLine($"{o.ID}, {o.Client}, {o.Product}, {o.Total}");
//}

Console.WriteLine("Done...");





//---------------------------------
/*Import XML data from Web file*/
//---------------------------------

//var Doc = await Importer.ImportAsync("https://ia801505.us.archive.org/17/items/xxx_20210114/xxx.xml");

//var R = (from x in Doc.Root.Elements("Order")
// select new
// {
// ID = x.Element("ID").Value,
// Client = x.Element("Client").Value,
// Product = x.Element("Product").Value,
// Total = x.Element("Total").Value
// });


//foreach (var o in R)
//{
// Console.WriteLine($"{o.ID}, {o.Client}, {o.Product}, {o.Total}");
//}

Console.WriteLine( "Done..." );


Console.ReadKey();
Expand Down

0 comments on commit 787eed0

Please sign in to comment.