我必須聲明,如果我需要修改,以便它檢查是否規約ID是一個數字(123654)等如何檢查ID是否是數字?
如果規約ID不是數字的錯誤消息應該說「規約ID值不是一個數字「
vb.net代碼
'Check to see if we got statuteId and make sure the Id string length is > than 0
If Not objXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:StatuteId/ss:Id[string-length(.)>0]", objXMLNameSpaceManager) Is Nothing Then
示例XML文檔
<?xml version="1.0" encoding="UTF-8"?>
<GetStatuteRequest>
<Statute>
<StatuteId>
<ID>15499</ID>
</StatuteId>
</Statute>
</GetStatuteRequest>
谷歌Int.TryParse – Cortright