Click here to Skip to main content
12,073,325 members (78,066 online)
Click here to Skip to main content

Stats

32.5K views
728 downloads
18 bookmarked
Posted

Simplify Reading and Writing of XML Fragments

, 8 Aug 2006
This article shows how to read and write XML fragments using the XmlChunkReader and XmlChunkWriter classes.
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace XmlChunkExample
{
    /// <summary>
    /// Sample object.
    /// </summary>
    public class Item
    {
        [XmlAttribute("number")]
        public int Number;
        public string Title;

        public Item()
        {
        }

        public Item(int number, string title)
        {
            this.Number = number;
            this.Title = title;
        }

        public override string ToString()
        {
            return String.Format("Item {0}: {1}", Number, Title);
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

notmasteryet
Software Developer
United States United States
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.160208.1 | Last Updated 8 Aug 2006
Article Copyright 2006 by notmasteryet
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid