Web/XML

xml 변환

나비:D 2008. 1. 14. 13:53

Private Sub test()

Dim oXML As New Xml.XmlDocument

Dim oNode As Xml.XmlNodeList

Dim sRoot As String

Dim sFile As String

Try

sRoot = System.Windows.Forms.Application.StartupPath

sFile = "Test.xml"

oXML.Load(sRoot & "" & sFile)

oNode = oXML.SelectNodes("Test/SubTest[@value=""AttValue01""]")

For Each oEle As System.Xml.XmlElement In oNode

MsgBox(oEle.OuterXml)

Next

Catch ex As Exception

MsgBox(ex.ToString)

Finally

oXML = Nothing

oNode = Nothing

End Try

End Sub

<