我想从邮递员的这个响应中获取 Cardholderid 的值。我正在使用这段代码:
var jsonData = xml2Json(responseBody);
var chid = jsonData["string"]["AccountAPIv2"]["CardIssue"]["Cardholderid"]
console.log(chid);
但我不断收到未定义的错误消息。有人可以帮忙吗?响应正文如下图:
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="---------/"><?xml version="1.0" encoding="us-ascii"?><AccountAPIv2
xmlns:xsd="-" xmlns:xsi="----
"><ErrorCode>0000</ErrorCode><Description>CardIssue
successful</Description><CardIssue><Cardholderid>123456789123</Cardholderid><AvailableBalance>0</AvailableBalance><LedgerBalance>0</LedgerBalance></CardIssue><ReferenceID>628549</ReferenceID></AccountAPIv2></string>
任何帮助,将不胜感激..