I have two xml files, one of them is dev.xml which has this code
<mapping>
<character>अ</character>
<itrans>a</itrans>
</mapping>
the second file is guj.xml
<mapping>
<character>અ</character>
<itrans>a</itrans>
<mapping>
i need to access these xml files and store the characters in an two dimensional array in global.asa!! i am using C# visual studio 2008!! thanks!!
I HAVE DONE THINGS SO FAR
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 the END OF FILE c ondition correct? i am getting an error!! how to use end of file in c#?
This should help you out:
This assumes this XML structure for dev.xml (added outer element
mappingsso you can store multiplemappingelements:You can use it like: