0
我在DataGridnView
中读取XML
文件但是在XML
文件中有一个图像并且在Datagrindview
中只读取它作为路径。从XML文件中读取图像
private void button1_Click(object sender, EventArgs e)
{
DataSet A = new DataSet();
A.ReadXml("C:/TrainedLabels.xml");
dataGridView1.DataSource = A.Tables[0];
}
这里XML
文件:
<?xml version="1.0" encoding="utf-8"?>
<Faces_For_Training>
<FACE>
<NAME>john</NAME>
<Age>25</Age>
<informations>Student in MS uni</informations>
<FILE>face_john 25Student in MSA university_905807542.jpg</FILE>
</FACE>
<FACE>
<NAME>Alia</NAME>
<Age>28</Age>
<informations>engineer</informations>
<FILE>face_Alia 28engineer_390671740.jpg</FILE>
</FACE>
</Faces_For_Training>
它使图像的像face_Alia 28engineer_390671740.jpg
在FILE
column
路径。 任何建议如何我可以读取图像。谢谢 。
谢谢你对Response的想法,我认为使用xml作为数据库对我来说是个坏主意。呵呵。所以我会通过vs数据库,并为我的脸识别。再一次非常感谢你 :) 。 – user3098164