Windows Scripting
  Home arrow Windows Scripting arrow Visual Basic 2005 XML Programming Using XM...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

Visual Basic 2005 XML Programming Using XML DOM
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2008-11-26

    Table of Contents:
  • Visual Basic 2005 XML Programming Using XML DOM
  • Sample XML document: source
  • Loading/Searching an XML document with XML DOM using Visual Basic.NET
  • Adding, Updating and Deleting From the XML Document with XML DOM Using Visual Basic.NET
  • Developing a complete form to work with XML DOM using Visual Basic.NET
  • Developing a complete form to work with XML DOM using Visual Basic.NET: continued

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Visual Basic 2005 XML Programming Using XML DOM


    (Page 1 of 6 )

    This article mainly focuses on manipulating XML documents using the XML API available in the .NET Framework. In simple terms, we will design a Windows Form and do all CRUD operations against an existing XML document.

    To make the article simple, I designed a Windows Form as follows.


    The entire source code for this article is available in the form of a free downloadable zip file. The solution was developed using Microsoft Visual Studio 2005 on Microsoft Windows Server 2003 Standard Edition (with SP3). I didn't really test it in any other environment. I request that you post in the discussion area if you have any problems in execution.

    Understanding the structure of the sample XML document

    Before we start manipulating the XML document, we should fully understand the content and structure of the XML document on which we are working. Let us try to understand the structure of the sample XML document from the following figure.


    The above would read something like the following:

    A company has a few departments. Each department has information about its number, name, location and a few employees working in the same. Similarly, all employee information is maintained with an ID, number, name, salary and department number.

    The starting point (say root) of the document is company (or "CompanyInfo"). All of the departments in the company are maintained (encapsulated) in a single unit named "DepartmentInfo." The "DepartmentInfo" contains a group of departments. Each piece of department information starts with a "Department" tag (or element). Every "Department" also has an "ID" as attribute and a group of elements directly beneath it. The tags "Deptno," "Dname," "Location" and "EmployeeInfo" are direct descendants of the "Department" tag. The "EmployeeInfo" contains a group of employees (along with their information). Every employee and his information ("Empno," "Ename," "Sal" and "Deptno") is embedded in a single parent element named "Employee," which is again a direct descendant to the "EmployeeInfo" element.

    More Windows Scripting Articles
    More By Jagadish Chaterjee


       · Hai,This article introduces CRUD operations to XML document using Visual Basic...
     

    WINDOWS SCRIPTING ARTICLES

    - Working With Arrays in VBScript
    - Compressed Folders in WSH
    - Using .NET Interops in VBScript
    - Nilpo`s Scripting Secrets, Vol I
    - Database operations using Silverlight 2.0 WC...
    - Modifying XML Files in WSH
    - Reading XML Files in WSH
    - Visual Basic 2005 XML Programming Using XML ...
    - Creating an XML Document in WSH
    - Introducing Two-Way Data Binding using Silve...
    - Silverlight 2.0 Application Development with...
    - Burning Multisession CDs with IMAPI2 in WSH
    - Creating a Silverlight 2.0 Application that ...
    - Burning CDs with the IMAPI2 Control
    - Burning CDs in Windows XP with WSH

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT