Results 1 to 3 of 3

Thread: VB.Net and XML

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2002
    Location
    Mesa, Arizona
    Posts
    45

    VB.Net and XML

    Hello all

    Anyone have or know where I can get some sample code in VB.Net to delete and update XML elements.

    Matthew Nace
    [email protected]

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Scroll down to the XML section:
    http://samples.gotdotnet.com/quickstart/howto/

  3. #3
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Here is a simple example in C#:

    Code:
    using System;
    using System.Xml;
    
    class XmlExample
    {
    	static void Main()
    	{
    		XmlDocument xSource = new XmlDocument();
    		XmlElement xBook = xSource.CreateElement("Book");
    		xBook.InnerText = "C# Rocks!";
    		xSource.AppendChild(xSource.CreateElement("BOOKS"));
    		xSource.DocumentElement.AppendChild(xBook);
    		Console.WriteLine(xSource.InnerXml);
    		xSource.DocumentElement.RemoveChild(xBook);
    		Console.WriteLine(xSource.InnerXml);
    	}
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width