C# 读取Xml 并赋值给 List - .NET技术 / C#
我有获取到一个xml格式的字符串 strXml:
XML code:
string strXml="
<ListConferenceResponse xmlns="http://mediax.huawei.com/webservice/types">
<description xmlns="">Success</description>
<page xmlns="">
<index>1</index>
<data>
<entry>
<key>StartTime</key>
<value>1274137920000</value>
</entry>
<entry>
<key>Subject</key>
<value>voice test</value>
</entry>
</data>
<data>
<entry>
<key>StartTime</key>
<value>45678912</value>
</entry>
<entry>
<key>Subject</key>
<value>testSub</value>
</entry>
</data>
</page>
</ListConferenceResponse>
";
我有一个类 ConferenceInfo:
C# code:
public class ConferenceInfo
{
private string _StartTime;
public string StartTime
{
get { return _StartTime; }
set { _StartTime = value; }
}
private string _Subject;
public string Subject
{
get { return _Subject; }
set { _Subject = value; }
}
}
我现在有个方法:
public static List<ConferenceInfo> GetXml
相关问答:
<?xml version="1.0" encoding="utf-8" ?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical&q ......
Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' 打开刚创建的文件。
ReDim MyString(LOF(1) - 1)
Put #1, , MyRecord ' 读入所有字符到变量中 ......
现在有个xml文件是<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xm ......
A表 有两个字段
id 唯一数字域
InfoTxt text 类型
我现在要把 id 不是14 的所有 InfoTxt字段 文本后面 都加上 'aaa'
按下面执行下来 只有表最后一行加上了 'aaa' ......
在Access的查询中执行下面的语句,无效,提示期待select ,updata ,...
CreateTble C=Answer N="回帖表"
(
C=ID T="INTEGER" P=No M=No N="编号" Z=false,
C=Ques ......