在下面的示例中,说 file.xml 标签中有值 return code=" " 我<Port name="write_qwe">
只需要里面的值。
<Main display="NORMAL">
<Port name="read_abc" exe="NO">
<input>
<struct file="C:\temp" sign="id1"/>
</input>
<output>
<return code="33" shortmsg="Implementation not found for commande."/>
</output>
</Port>
<Port name="write_qwe" exe="NO">
<input>
<struct file="C:\temp" id="id1"/>
</input>
<output>
<return code="1" shortmsg="NOTEXECUTED" longmsg="Not execute due to previous error"/>
</output>
</Port>
<Port name="read_abc" exe="NO">
<input>
<struct file="C:\temp" sign="id2"/>
</input>
<output>
<return code="66" shortmsg="Implementation"/>
</output>
</Port>
<Port name="write_qwe" exe="NO">
<input>
<struct file="C:\temp" id="id2"/>
</input>
<output>
<return code="0" shortmsg="NOTEXECUTED" />
</output>
</Port>
</Main>
我需要获取
<return code" ">
which is inside
<port name="write_*">
和 inside
的值<output>
。在此示例中,我需要获取值 "1" 和 "0" 。