我有以下输入XML:
<CALL>
<Message><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>p { margin-top:0px; margin-bottom:0px;font-family: Arial, Helvetica,
sans-serif;font-size:13px;}</style> <span> <span> <span>
<span> <span> <span> <span> <span> <span> <span>
<span> <font face="Times New Roman" size="3"> </font> <p style="margin:
0cm 0cm 0pt;"> <font color="#1f4e79" face="Calibri" size="3"
>ID=</font> <b> <span style="background: white; color: black;
font-family: &quot;Arial&quot;,sans-serif; font-size: 9pt;" >
996712804</span> </b> </p> <font face="Times New Roman" size="3">
</font> <p style="margin: 0cm 0cm 0pt;"> <span style="color: rgb(31, 73,
125);"> <font face="Calibri" size="3" >Name= 05</font>
</span> </p> <font face="Times New Roman" size="3"> </font> <p
style="margin: 0cm 0cm 0pt;"> <font face="Calibri"> <font size="3"> <font
color="#1f4e79">Remarks=</font> <span style="color: rgb(31, 73, 125);">
Accepted</span> </font> </font> </p> <font face="Times New
Roman"> </font> </span> </span> </span> </span>
</span> </span> </span> </span> </span> </span>
</span> <br/> </meta> </Message>
其中有三个项目;我试图使ID,名称和备注看起来像这样:
<ID>996712804</ID>
<Name>05</Name>
<Remarks>Accepted</Remarks>
但是我不确定如何解析html标签,然后分别解析我需要的三个标签。
我是否必须解析html并在同一个变量中添加子字符串?任何线索表示赞赏!