Browse by Tags

All Tags » Xml » CSharp » C# (RSS)
This prior post demonstrated a very simple technique for writing to an XML file that has a set of elements. This post extends that example showing how to write an XML file that has both elements and  attributes. Here is the XML file created by this...
4 comment(s)
Filed under: , , , ,
This prior post detailed how to write to an XML file. This post details how to read that XML file. The example reads the values and populates three TextBoxes, but you can use this technique to read any information from an XML file. XML File: <?xml...
5 comment(s)
Filed under: , , , ,
Sometimes, you just need to write some values to an XML file. If you are targeting the .NET Framework 3.5 or higher, you can use XDocument and XElement to do this easily. This post demonstrates how to write values to an XML string. The example writes...
7 comment(s)
Filed under: , , , ,
In this prior post , I demonstrated how to find a node in an XML string. In this post, I expand on that topic to find a set of nodes. You can then process those nodes as needed in your application. In this example, the set of nodes are displayed in a...
1 comment(s)
Filed under: , , , , ,
A common requirement with an XML file is to find a particular node. If you are targeting the .NET framework 3.5 or higher, you can find the node using Linq to XML or by using Lambda expressions. As with many of my prior XML examples, the XML string is...
3 comment(s)
Filed under: , , , , , ,
You can document your classes, properties, methods, and so on using XML tags. I'm sure all developers know this at this point, but did you know that you can modify the set of valid tags? If you are not familiar with XML Documentation Comments (or...
with no comments
Filed under: , , , ,
If you are using XML in a WinForms application you may find the need to display the XML data in a DataGridView. Let's take this XML: <states>     <state name="California">        ...
There are many different types of text files that you may need to process in your applications. Some of the more common types are described in this post. Delimited files Delimited files separate the fields of the file with some type of a delimiter. The...
8 comment(s)
Filed under: , , , , ,
I have an XML string as follows: <States>   <State name="Wisconsin">     <Regions>       <Region name="Milwaukee">         <Area...
4 comment(s)
Filed under: , , , , , ,
This post describes how to populate a WinForms TreeView control from an XML file assuming you are targeting the .NET Framework Version 3.5. The XML file used in this example looks like this: <States>   <State name="California">...
12 comment(s)
Filed under: , , , , ,