我想断言一个值(
ActualCode
)中
XPath Assertions
。我对JSON路径断言很有经验,但对XML路径断言完全陌生。我如何在此处断言“ActualCode”值?
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:CreateValidCode xmlns:ns2="http://www.example.net/lmsglobal/ws/v1/extint/types" xmlns="http://www.example.net/lmsglobal/xsd/v1/types" xmlns:ns3="http://www.example.net/lmsglobal/ws/v1/extint/notification/types">
<ns2:ValidCode>ActualCode</ns2:ValidCode>
<ns2:State>1</ns2:State>
</ns2:CreateValidCode>