我的页面中有一个字符串,字符串响应。 此String包含xml内容。现在我需要根据响应值检查条件。所以我需要获取特定的节点值。例如,
<?xml version="1.0" encoding="UTF-8"?>
<Response version="1.0">
<Transaction mode="INTEGRATOR_TEST" channel="d225a9fefe3fbaf400fe43294aca000d" response="SYNC"> <Identification>
<ShortID>463.4646.464.4463</ShortID>
<UniqueID>8a82944932c9db190132cee846be54d0</UniqueID>
<TransactionID>K8463</TransactionID>
</Identification>
<Payment>
<Clearing>
<Amount>1000.00</Amount>
<Currency>INR</Currency>
<Descriptor>XX XCXXXXX</Descriptor>
<FxRate>1.0</FxRate>
<FxSource>INTERN</FxSource>
<FxDate>2011-10-04 12:28:41</FxDate>
</Clearing>
</Payment>
<Processing code="DD.DB.90.00">
<Timestamp>2011-10-04 12:28:41</Timestamp>
<Result>ACK</Result>
<Status code="90">NEW</Status>
<Reason code="00">Successful Processing</Reason>
<Return code="000.100.110">Request successfully processed in 'Merchant in Integrator Test Mode'</Return> <Risk score="0" />
</Processing>
</Transaction>
</Response>
那么如何读取特定节点?例如,如何读取状态节点?...