Using C# Generics read & update XML file .
2013-02-17 09:49
447 查看
public List<XmlElement> GetNodeList()
{
list = new List<XmlElement>();
XmlNode nodeFirst= document.SelectSingleNode("Ele\NodeFirst"));
XmlNode nodeSecond= document.SelectSingleNode("Ele\NodeSecond"));
list.Add(nodeFirst);
list.Add(nodeTwo);
return list;
}
List<XmlElement> Newlist = GetNodeList();
foreach (XmlElement item in Newlist )
{
Console.WriteLine("\t{0}\t{1}\t{2}",item.value
}
NewList.Remove(nodeTwo);
FYI : http://panjunlai.blog.163.com/blog/static/581903012010420781664/
{
list = new List<XmlElement>();
XmlNode nodeFirst= document.SelectSingleNode("Ele\NodeFirst"));
XmlNode nodeSecond= document.SelectSingleNode("Ele\NodeSecond"));
list.Add(nodeFirst);
list.Add(nodeTwo);
return list;
}
List<XmlElement> Newlist = GetNodeList();
foreach (XmlElement item in Newlist )
{
Console.WriteLine("\t{0}\t{1}\t{2}",item.value
}
NewList.Remove(nodeTwo);
FYI : http://panjunlai.blog.163.com/blog/static/581903012010420781664/
相关文章推荐
- Using C# Generics read & update XML file .
- Csharp: read excel file using Open XML SDK 2.5
- C# read XML file
- Media file conversion Using FFMPEG & C#
- Step By Step guide to Read XML file in Java Using SAX Parser Example
- Csharp: read excel file using Open XML SDK 2.5
- Csharp: read excel file using Open XML SDK 2.5
- Create, Read, Write, Copy, Move and Delete a Text File using C# and VB.NET
- Creating a XML Document from scratch without using a file in C#
- C# Read and Modify XML File
- Create, Read, Write, Copy, Move and Delete a Text File using C#
- prjGetWriteINIFile - How to Read-Write INI file using VB & API - 读取/写入INI文件 - VB6 + API - SourceCode - HackerJLY
- csharp:using OpenXml SDK 2.0 and ClosedXML read excel file
- Create, Read, Write, Copy, Move and Delete a Text File using C#
- 'libxml/tree.h' file not found
- C# read xml from a string and performance test
- Why is using BufferedInputStream to read a file byte by byte faster than using FileInputStream
- 关于web.xml中<welcome-file-list>
- c#设置xml空节点不换行;添加属性为xsi:nil="true"的空节点
- Serialization in C# without using file system