Public Class 取得命令
Private Const xmlns As String = "{urn:hl7-org:v3}"
Private _xElement As XElement
Public Sub New(ByVal xml As String)
_xElement = XElement.Parse(xml)
'_單張檔名 = 單張檔名
End Sub
Public ReadOnly Property 資料庫主機名稱 As String
Get
Try
Return _xElement.Element(xmlns & "資料") _
.Element(xmlns & "備份") _
.Element(xmlns & "資料庫主機名稱").Value
Catch ex As Exception
Return ""
End Try
End Get
End Property
Public ReadOnly Property 資料庫名稱 As String
Get
Try
Return _xElement.Element(xmlns & "資料") _
.Element(xmlns & "備份") _
.Element(xmlns & "資料庫名稱").Value
Catch ex As Exception
Return ""
End Try
End Get
End Property
End Class
取用方式:p.Element(xmlns & "資料庫主機名稱").Value