I want to read through any XML document and find each element with an attribute called "DataCode".
The xml documents come from various vendors and will have different schemas. The code below works for each child of the root node. But not for grand children or great grand children.
How can I read thru the xml document as if it was a array?
XDocument doc = _xDocument;
IEnumerable<XElement> childList =
from el in doc.Root.Elements()
foreach (XElement e in childList)
IEnumerable<XAttribute> attList = e.Attributes("DataCode");
foreach (XAttribute att in attList)
Debug.WriteLine("datacode found " + att.Value);
Exception Handling is in the core of any application that is able to dignify its name.
In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day.
Enter Foreign and Special Characters
Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~
Use these codes in any Windows application! ... whether it is a Micr…