We will see more about each one of these operators in detail, with examples in
Chapter 7, Standard Query Operators.
Queries
Let us take an example of new XML data that has details of different ice-creams.
XElement Icecreams =
new XElement("Icecreams",
new XElement("Icecream",
new XComment("Cherry Vanilla Icecream"),
new XElement("Flavor", "Cherry Vanilla"),
new XElement("ServingSize", "Half Cup"),
new XElement("Price", 10),
new XElement("Nutrition",
new XElement("TotalFat", "15g"),
new XElement("Cholesterol", "100mg"),
new XElement("Sugars","22g"),
new XElement("Carbohydrate", "23g"),
new XElement("SaturatedFat", "9g"))));
Icecreams.Add(
new XElement("Icecream",
new XComment("Strawberry Icecream"),
new XElement("Flavor", "Strawberry"),
new XElement("ServingSize", "Half Cup"),
new XElement("Price", 10),
new XElement("Nutrition",
new XElement("TotalFat", "16g"),
new XElement("Cholesterol", "95mg"),
new XElement("Sugars","22g"),
new XElement("Carbohydrate", "23g"),
new XElement("SaturatedFat", "10g"))));
In the above XML, we have the details of two different ice-creams.
Pages:
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111