1、单一内容读取
HashMap<String,String> xmlparse(String xmlfile,String nodename)
如:
login.xml
<?xml version="1.0"
encoding="UTF-8"?>
<languages>
<l
name="welcome_login">Welcome Login!</l>
<l
name="user_holder">Enter the
username</l>
</languages>
java:
HashMap<String,String> res=xmlparse("login.xml","l");
Element xmlfile(String filepath)//解析mxl文件
Element xmlstr(String str)//解析xml字符串