下面是一个可以判断xml 节点是否存在的函数,如下,仅供参考:

Function xmlElementNodeIsExist(ByVal xmlpath As String, ByVal strElementNodeName As String) As Boolean

Using reader As XmlReader = XmlReader.Create(xmlpath)
While reader.Read()
If reader.Name = strElementNodeName And reader.NodeType = XmlNodeType.Element Then
Return True
End If
End While
End Using
Return False

End Function

相关文章:

  • 2021-12-17
  • 2022-12-23
  • 2022-02-02
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-28
  • 2022-12-23
  • 2021-05-18
  • 2021-06-18
  • 2021-06-20
  • 2021-09-26
相关资源
相似解决方案