【发布时间】:2014-10-10 08:09:29
【问题描述】:
我有像
这样的 html 字符串<td AutoTab="true" Compulsory="true" ValidationGroup="OU20141008-0001" class="bn_TextBox bn_TextBox_com i" class="r">
<span id="FixedGrid1__txtSUPPLY_AMT_0_Container">
<input AutoTab="true" Compulsory="true" ValidationGroup="OU20141008-0001" class="bn_TextBox bn_TextBox_com r ime-disabled" name="FixedGrid1$ctl11$_txtSUPPLY_AMT" type="text" value="900000" readonly="readonly" id="FixedGrid1__txtSUPPLY_AMT_0" style="color:0;background-color:0;width:96%;" />
</span>
</td><td class="r">
<span id="FixedGrid1__txtM_AMT_0_Container"><input AutoTab="true" class="bn_TextBox r ime-disabled" name="FixedGrid1$ctl11$_txtM_AMT" type="text" value="818181" readonly="readonly" id="FixedGrid1__txtM_AMT_0" style="color:0;background-color:0;width:96%;" /></span>
</td><td class="r">
<span id="FixedGrid1__txtTAX_AMT_0_Container"><input AutoTab="true" Compulsory="true" ValidationGroup="OU20141008-0001" class="bn_TextBox bn_TextBox_com r ime-disabled" name="FixedGrid1$ctl11$_txtTAX_AMT" type="text" value="81818" readonly="readonly" id="FixedGrid1__txtTAX_AMT_0" style="color:0;background-color:0;width:96%;" /></span>
</td><td class="c">2014-10-08</td><td>1111</td><td class="c">
<span id="FixedGrid1_Label5_0_Container"><span id="FixedGrid1_Label5_0" class="bn_Label">2014-10-08</span></span>
</td><td class="c">
<span id="FixedGrid1_Label6_0_Container"><span id="FixedGrid1_Label6_0" class="bn_Label">2014-10-08</span></span>
</td>
我需要将这个 input type=text html 标签替换为它的值的纯文本。
喜欢
<input AutoTab="true" Compulsory="true" ValidationGroup="OU20141008-0001" class="bn_TextBox bn_TextBox_com r ime-disabled" name="FixedGrid1$ctl11$_txtSUPPLY_AMT" type="text" value="900000" readonly="readonly" id="FixedGrid1__txtSUPPLY_AMT_0" style="color:0;background-color:0;width:96%;" />
这仅保留在 900000
我知道有 HTML Agility 包,它简单快捷。
但在这种情况下,我不能使用任何 3rd 方库。
有人可以帮忙吗?
【问题讨论】: