XML
  Home arrow XML arrow Creating XML Trees with the XmlTextWriter ...
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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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? 
XML

Creating XML Trees with the XmlTextWriter and XmlDocument Objects
By: Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 27
    2004-04-21

    Table of Contents:
  • Creating XML Trees with the XmlTextWriter and XmlDocument Objects
  • Spending Time in the Library
  • Breaking It Down
  • The Real Thing
  • Walking the DOM
  • Adding More
  • Linking Out

  • 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


    Creating XML Trees with the XmlTextWriter and XmlDocument Objects


    (Page 1 of 7 )

    So you know all about reading and parsing XML files, and even checking if they're well-formed and valid. Now, take a step into more advanced territory with this expose of two objects that let you dynamically create well-formed XML documents in your ASP.NET scripts.

    Reading And Writing

    If you've been following past issues of this column, you're probably already aware of the numerous things you can do with XML and the .NET framework. You already know that there are two ways XML can be parsed, either via the Document Object Model (DOM) or the Microsoft-inspired "pull" model; that each method has pros and cons; that the selection of a parsing technique depends largely on the application; and that the .NET framework today supports both parsing methods, making it a versatile and flexible tool for XML application development.

    Now, reading XML data is only half of the puzzle. Take a minute to think about the developer who gets an XML feed from a third-party vendor and needs to rejigger this data into a new XML file based on a custom DTD or XML Schema. How does (s)he do this? Is it possible to write an XML file on-the-fly?

    Well, guess what? Just as there are two classes for reading XML data, the .NET framework comes with two for writing XML as well. The first of these is the handy XmlTextWriter object, which lets you write XML at run-time, and the second is the XmlDocument object, which allows you create XML files on-the-fly.

    Intrigued? Keep reading.

    More XML Articles
    More By Harish Kamath (c) Melonfire


     

    XML ARTICLES

    - More on Triggers and Styles and Control Temp...
    - Looking at Triggers with Styles and Control ...
    - A Closer Look at Styles and Control Templates
    - Styles and Control Templates
    - Properties and More in XAML
    - Elements and Attributes in XAML
    - XAML in a Nutshell
    - Importing XML Files into Access 2007
    - Using MSXML3.0 with VB 6.0
    - MSXML, concluded
    - MSXML, continued
    - MSXML Tutorial
    - Generating XML Schema Dynamically Using VB.N...
    - XSL Transformations using ASP.NET
    - Applying XSLT to XML Using ASP.NET





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 9 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek