CSharp examples for System.Xml:XML Attribute
Get XML Attribute
// Permission is hereby granted, free of charge, to any person obtaining using System.Xml; using System.Collections.Generic; using System;/*from ww w.j a v a 2 s . com*/ public class Main{ #region Attributes public static string GetAttribute(XmlNode node, string name) { XmlAttribute attr = node.Attributes[name]; return attr == null ? null : attr.Value; } }