RE: easily reading and using an XML-string

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jim Perry (jperry_at_qssmeds.com)
Date: 05/07/04


Date: Fri, 7 May 2004 12:11:06 -0700

Check out the XMLDocument class and the LoadXML method for loading the string:

Option Explicit
Option Strict

Imports System
Imports System.IO
Imports System.Xml

Public Class Sample
    
    Public Shared Sub Main()
        'Create the XmlDocument.
        Dim doc As New XmlDocument()
        doc.LoadXml(("<book genre='novel' ISBN='1-861001-57-5'>" & _
                    "<title>Pride And Prejudice</title>" & _
                    "</book>"))
        
        'Save the document to a file.
        doc.Save("data.xml")
    End Sub 'Main
End Class 'Sample

You can then use the class's method for searching for specific nodes and the info they contain.



Relevant Pages

  • Re: easily reading and using an XML-string
    ... > Check out the XMLDocument class and the LoadXML method for loading the ... > Option Explicit ... > Imports System.IO ... > Public Shared Sub Main ...
    (microsoft.public.dotnet.languages.vb)
  • VB.NET Shutdown from text file
    ... Option Explicit On ... Imports System.IO ... Public Class Form1 ... Private Sub Form1_Load(ByVal sender As System.Object, ...
    (microsoft.public.dotnet.languages.vb)
  • VB.NET Shutdown from text file
    ... Option Explicit On ... Imports System.IO ... Public Class Form1 ... Private Sub Form1_Load(ByVal sender As System.Object, ...
    (microsoft.public.vb.general.discussion)
  • Re: VB.NET Shutdown from text file
    ... Option Explicit On ... Imports System.IO ... Public Class Form1 ... Private Sub Form1_Load(ByVal sender As System.Object, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Capture keys at fome level
    ... Option Explicit On ... Imports System.Windows.Forms ... Public Class myKeyClass Implements owf.IMessageFilter ...
    (microsoft.public.dotnet.framework.compactframework)