01
using
System;
02
System.Collections.Generic;
03
System.Linq;
04
System.Xml.Linq;
05
System.Text;
06
07
namespace
Demo
08
{
09
class
Program
10
11
static
void
Main(
string
[] args)
12
13
xmlFileName =
@"C:\CustomerOrders.xml"
;
14
XDocument cust = XDocument.Load(xmlFileName);
15
16
Console.WriteLine(
"Elements in XML:"
);
17
var qResult = from c
in
cust.Elements()
18
select c.Name;
19
foreach
(var itemList
qResult)
20
21
Console.WriteLine(itemList);
22
}
23
Console.Write(
"Press Enter to continue:"
24
Console.ReadLine();
25
26
27
28
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: