- 论坛徽章:
- 0
|
需求:
现有文本test.txt
内容为:
Connection><DataSource modified='1' type='string'><![CDATA[xdatasourcex]]></DataSource><Username modified='1' type='string'><![CDATA[xusernamex]]></Username><Password modified='1' type='protectedstring'><![CDATA[xpasswordx]]></Password></Connection><Usage><WriteMode type='int'><![CDATA[xwritemodex]]></WriteMode><GenerateSQL modified='1' type='bool'><![CDATA[xgene is wom ratesqlx]]></GenerateSQL><TableName modified='1' type='string'><![CDATA[xtablenamex]]></TableName>
我想写一个函数getinfo,实现的功能如下:
getinfo DataSource test.txt得到的输出为xdatasourcex
getinfo Username test.txt得到的输出为xusernamex
getinfo GenerateSQL test.txt得到的输出为xgene is wom ratesqlx |
|