Lire les attributs à partir d’un noeud

Author:

Utilisation,de,la,classe,'XmlTextReader',pour,lire,un,document,XML
{filelink=16415}

/*
 Microsoft Public License (Ms-PL)
 http://dbmlmanager.codeplex.com/license
*/

#region using
using System;
using System.Xml;
#endregion

nomspace DbmlManager.Lib.Utility
{
  #region Class Docs
  ///

  /// Summary description for XmlUtil.
  /// 

  #endregion

  public class XmlUtil
  {

    #region GetAttrib(XmlNode noeud, string nom)
    public static string GetAttrib(XmlNode noeud, string nom)
    {
      if (noeud.Attributes == null)
        return null;

      if (noeud.Attributes[nom] == null)
        return null;

      return noeud.Attributes[nom].InnerText;
    }
    #endregion

  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *