C#
  Home arrow C# arrow Page 3 - C# and XML
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? 
C#

C# and XML
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 2 stars2 stars2 stars2 stars2 stars / 3
    2008-11-20

    Table of Contents:
  • C# and XML
  • XML Documentation
  • Predefined XML Tags
  • User-Defined Tags

  • 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


    C# and XML - Predefined XML Tags


    (Page 3 of 4 )

    Here is a list of the predefined set of XML tags that can be used to mark up the descriptive text:

    <summary>

    <summary>description</summary>
    This is the first thing you will see when IntelliSense shows the tool tip for the member.

    <remarks>

    <remarks>description</remarks>
    This is the additional text you will see when IntelliSense shows the tool tip for the member. This tag provides additional information regarding a particular member. Information about side effects within the method, or particular behavior that may not otherwise be intuitive (such as the idea that this method may throw anArrayOutOfBoundsExceptionif a parameter is greater than 5) is listed here.

    <param>

    <param name="name">description</param>
    This tag describes a parameter on a method. If this tag is applied to any parameter on a method, all of the parameters on that method must be documented.

    <returns>

    <returns>description</returns>
    This tag describes the return value for a method.

    <exception>

    <exception [cref="type"]>description</exception>
    This tag documents the exceptions a method may throw. If present, the optionalcref attribute should refer to the type of the exception. The type name must be enclosed in double quotation marks ("").

    <permission>

    <permission [cref="type"]>description</permission>
    This tag documents the permissions requirement for a type or member. If present, the optionalcrefattribute should refer to the type that represents the permission set required by the member, although the compiler does not validate this. The type name must be enclosed in double quotation marks ("").

    <example>

    <example>description</example>
    This tag provides a description and sample source code explaining the use of a type or member. Typically, the<example>tag provides the description and contains the<c>and<code>tags, although they can also be used independently.

    <c>

    <c>code</c>
    This tag indicates an inline code snippet. Typically, this tag is used inside an<example>block (described previously).

    <code>

    <code>code</code>
    This tag is used to indicate multiline code snippets. Again, this is typically used inside an<example>block (described previously).

    <see>

    <see cref="member">text</see>
    This tag identifies cross-references in the documentation to other types or members. Typically, the<see>tag is used inline within a description (as opposed to the<seealso>tag, which is broken out into a separate “See Also” section). This tag is useful because it allows tools to generate cross-references, indexes, and hyperlinked views of the documentation. Member names must be enclosed by double quotation marks ("").

    <seealso>

    <seealso cref="member">text</seealso>
    This tag identifies cross-references in the documentation to other types or members. Typically,<seealso>tags are broken out into a separate “See Also” section. This tag is useful because it allows tools to generate cross-references, indexes, and hyperlinked views of the documentation. Member names must be enclosed by double quotation marks ("").

    <value>

    <value>description</value>
    This tag describes a property on a class.

    <paramref>

    <paramref name="name"/>
    This tag identifies the use of a parameter name within descriptive text, such as<remarks>. The name must be enclosed by double quotation marks ("").

    <list>
        <list type=[ bullet | number | table ]>
         
    <listheader>
            <term>name</term>
           <description>description</description>
          </listheader>
         
    <item>
            <term>name</term>
          <description>description</description>
          </item
       </list>

    This tag provides hints to documentation generators about how to format the documentation—in this case, as a list of items.

    <para>

    <para>text</para>
    This tag sets off the text as a paragraph to documentation generators.

    <include>

    <include file='filename' path='path-to-element'>
    This tag specifies an external file that contains documentation and an XPath path to a specific element in that file. For example, a path of
    docs[@id="001"]/*retrieves whatever is inside<docs id="001"/>. Thefilenameandpathmust be enclosed by single quotation marks (''), but you must use double quotation marks ("") for theidattribute within thepath-to-elementexpression.

    More C# Articles
    More By O'Reilly Media


       · This article is an excerpt from the book "C# 3.0 in a Nutshell, Third Edition, A...
     

    Buy this book now. This article is excerpted from chapter four of C# 3.0 in a Nutshell, Third Edition, A Desktop Quick Reference, written by Joseph Albahari and Ben Albahari (O'Reilly; ISBN: 0596527578). Check it out today at your favorite bookstore. Buy this book now.

    C# ARTICLES

    - C# Meets Design Patterns
    - Coding a CRC-Generating Algorithm in C
    - Cyclic Redundancy Check
    - Handling Methods and Functions
    - Destroying Objects in C#
    - Creating Objects in C-Sharp
    - Classes and Objects
    - Programming Languages: Managed versus Native
    - LINQ-to-MySQL with DbLinq in C#
    - Working with Dates and Times in C#
    - Generics, Dictionaries, and More
    - More About Generics
    - Working with C# Collections
    - Generics
    - C# and XML





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