We have a complex XML Structure and really a big one (>500 MB). the XSD of the structure is: This XSD
As we know this is a complex one. and because of size or non-t
Just to add an alternative version,
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element && reader.Name == "product")
{
var productElement = XElement.ReadFrom(reader);
// use element
string productName = productElement.Element("name").Value;
}
}
The XElement class is from System.Xml.Linq , I find it the easiest way to deal with XML (without full deserialization to a class).