Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Verificateur des caractéristiques DOM

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

using System;
using System.Xml;
 
class DomFeatureChecker
{
 
  private static readonly string [] versions = new string []
  {
    "1.0", "2.0" , "3.0", "4.0"
 
    };
 
  private static readonly string [] Caracteristiques= new string []
  {
    "HTML", "Views", "Stylesheets","Core", "XML", "CSS",
    "CSS2", "Events", "UIEvents", "MouseEvents", "MutationEvents",
    "HTMLEvents", "Range", "Traversal"
  };
 
  public static void Main(string[] args)
  {
    XmlImplementation impl = new XmlImplementation();
 
    foreach (string version in versions) {
        foreach (string cataracteristique in Caracteristiques)
        {
        Console.WriteLine("{0} {1}={2}", cataracteristique, version,
          impl.HasFeature(cataracteristique, null));
      }
    }
  }
}

No comments yet.

Leave a Comment