<?xml version="1.0" encoding="utf-8" ?>
<grade>
<files>
<value>1</value>
<text>空净房</text>
</files>
<files>
<value>2</value>
<text>占用房</text>
</files>
<files>
<value>3</value>
<text>脏房</text>
</files>
<files>
<value>4</value>
<text>维修房</text>
</files>
<files>
<value>5</value>
<text>预订房</text>
</files>
<files>
<value>6</value>
<text>长包房</text>
</files>
</grade>
这是我在C#中的一个xml文件,在程序中我想让其像数据库表一样,要用时用个value值便可查到text的内容,或用个text的内容便可查询到value的值,不知如何处理?请教熟悉此道的师兄。
<grade>
<files>
<value>1</value>
<text>空净房</text>
</files>
<files>
<value>2</value>
<text>占用房</text>
</files>
<files>
<value>3</value>
<text>脏房</text>
</files>
<files>
<value>4</value>
<text>维修房</text>
</files>
<files>
<value>5</value>
<text>预订房</text>
</files>
<files>
<value>6</value>
<text>长包房</text>
</files>
</grade>
这是我在C#中的一个xml文件,在程序中我想让其像数据库表一样,要用时用个value值便可查到text的内容,或用个text的内容便可查询到value的值,不知如何处理?请教熟悉此道的师兄。
解决方案 »
- button click事件怎么被调用(在线等)
- 算法大挑战
- c# C/S 程序 能实现上传下载功能吗?
- C#画圆问题!
- WM-17U读卡器器驱动及接口
- BINDINGSOURCE的问题
- C# 怎么才能得到外网的IP--急急在线等,问题解决马上给分
- 招聘.net程序员、系统分析员、专职测试人员(北京工作)
- 如何在picturebox上写入文字
- 程序版面
- 如何在dataset 中将 type 是string 得字符串放到type 是double 的colunm中,或者怎样将有数据的datatable 中type 为double 的colunm转换成string
- 把如何把BTYE数据弄成图片呈现到页面上
如果查询次数多的话,建议lz转成dictionary后查,因为xml查询效率不高。