ASP.NET读取XML的问题(C#+JAVASCRIPT)
XML格式如下:
<?xml version= "1.0 " encoding= "utf-8 "?>
<MsgList>
<Class name= "全局消息 ">
<Item name= "返回结果成功 " code= "100 " const= "RESULT_OK " msg= "返回结果成功! "/>
<Item name= "提交时ILK值错误 " code= "100 " const= "RESULT_ILK_ERROR " msg= "找不到该模块! "/>
<Item name= "提交时参数错误 " code= "102 " const= "RESULT_PARM_ERROR " msg= "参数错误! "/>
</Class>
<Class name= "管理员消息 ">
<Item name= "登录成功 " code= "100 " const= "RESULT_ADMIN_LOGIN_OK " msg= "登录成功! "/>
<Item name= "登录验证码错误 " code= "102 " const= "RESULT_ADMIN_VERIFY_ERROR " msg= "验证码错误! "/>
<Item name= "登录帐号或密码错误 " code= "103 " const= "RESULT_ADMIN_PWD_ERROR " msg= "帐号或密码错误! "/>
<Item name= "登录帐号被冻结 " code= "104 " const= "RESULT_ADMIN_FREEZE " msg= "此帐号已被冻结! "/>
<Item name= "登录帐号被冻结 " code= "204 " const= "RESULT_ADMINGROUP_FREEZE " msg= "此帐号已被冻结! "/>
</Class>
<Class name= "留言本消息 ">
<Item name= "留言成功 " code= "800 " const= "RESULT_GBOOK_MSG_OK " msg= "留言成功!谢谢您的留言! "/>
<Item name= "留言数据库错误 " code= "801 " const= "RESULT_GBOOK_MSG_DATABASE_ERROR " msg= "留言失败!请重试! "/>
<Item name= "名称为空 " code= "803 " const= "RESULT_GBOOK_NAME_EMPTY " msg= "请问大虾贵姓?! "/>
<Item name= "名称越界 " code= "804 " const= "RESULT_GBOOK_NAME_BOUND " msg= "称呼过长,限制为6个中文汉字! "/>
<Item name= "联系方式为空 " code= "805 " const= "RESULT_GBOOK_CONTACT_EMPTY " msg= "请输入联系方式! "/>
<Item name= "联系方式越界 " code= "806 " const= "RESULT_GBOOK_CONTACT_BOUND " msg= "联系方式不能超过40个中文汉字! "/>
<Item name= "留言内容为空 " code= "807 " const= "RESULT_GBOOK_TEXT_EMPTY " msg= "请输入留言内容! "/>
<Item name= "留言内容越界 " code= "808 " const= "RESULT_GBOOK_TEXT_BOUND " msg= "留言内容不能超过100个中文汉字! "/>
</Class>
</MsgList>
要求:
C#中传入宏名(const的值)取得代码(code的值),然后返回这个值到客户端,客户端通过这个值取得消息(