0
我有兩個XML文件,其中之一是dev.xml具有這種代碼C#的xml文件訪問
<mapping>
<character>अ</character>
<itrans>a</itrans>
</mapping>
第二個文件是guj.xml
<mapping>
<character>અ</character>
<itrans>a</itrans>
<mapping>
我需要訪問這些XML文件,並將字符存儲在global.asa中的二維數組中!我正在使用C#visual studio 2008!謝謝!!
我做的事情到目前爲止
sbyte[,] a = new sbyte[100, 100];
sbyte[,] b = new sbyte[100, 100];
int count = 0;
XDocument xmlDoc = XDocument.Load("dev.xml");
while (!eof)
{
if (documentcontent.childnode == "true")
count = count + 1;
}
for(int i=0;i<count;i++)
{
for(int j=0;j<count;j++)
{
if(j==0)
a[i][j]=documentcontent.childnode.childnode[0].data;
else
a[i][j]=documentcontent.childnode.childnode[1].data;
}
}
IS文件c ondition年底是否正確?我收到一個錯誤!如何在C#中使用文件結尾?
@user:你的問題是什麼? – Marnix 2011-03-19 15:58:39
什麼你到目前爲止?你堅持什麼? (所以SO不會爲你寫代碼。) – Richard 2011-03-19 15:59:04
[c#xml file access]的副本(http://stackoverflow.com/questions/5362974/c-xml-file-access)。請不要發佈/詢問舊版問題的修改版本,而是編輯原始問題。 – 2011-03-19 16:01:43