Использование XML LINQ
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml;
using System.Xml.Linq;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
XElement data = new XElement("Data", new object[] {
new XElement("ThuChi", new object[] {
new XAttribute("SoTien", ""),
new XAttribute("NgayThuChi", ""),
new XAttribute("LoaiThuChi", ""),
new XAttribute("GhiChu", ""),
new XAttribute("IdThanhVien", "")
})
});
string xmlStr = data.ToString();
XDocument doc = XDocument.Parse(xmlStr);
var results = doc.Descendants("ThuChi").Select(x => new
{
SoTien = (string)x.Attribute("SoTien"),
NgayThuChi = (string)x.Attribute("NgayThuChi"),
LoaiThuChi = (string)x.Attribute("LoaiThuChi"),
GhiChu = (string)x.Attribute("GhiChu"),
IdThanhVien = (string)x.Attribute("IdThanhVien")
}).FirstOrDefault();
}
}
}
Где ур C# код ASMX? – Aravind