Skip to Content

How to read the XML data using VB.NET

Hi,

   I am not knowing how to get the data from xml using vb.net.

Please guide me its urgent to me.

Regards,

P.Pallavi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 21, 2015 at 04:15 AM

    This is how I read XML in .NET. I'm using this for DI Server.

                    For Each oFile As String In Directory.GetFiles(YOURPATH, "FILENAME.XML", SearchOption.TopDirectoryOnly)

                        oFileName = Path.GetFileName(oFile)

                        ds = New DataSet

                        ds.ReadXml(oFile)

                        oHeader = ds.Tables("TABLE IN XML").Copy

                        For Each oDr As DataRow In oHeader.Rows

                            MsgBox(oDr("FieldName IN XML"))

                        Next

                    Next

    Regards,

    Bry

    Blog: http://www.sap-tips-tricks.com/

    Add comment
    10|10000 characters needed characters exceeded