//Microsoft Public License (Ms-PL)
//http://visualizer.codeplex.com/license
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace Redwerb.BizArk.Core.XmlExt
{
///
/// Provides extension methods for processing Xml.
///
public static class XmlExt
{
///
/// Gets a string from an attribute or node.
///
///
///
///
///
public static string GetString(this XmlNode node, string name, string dfltVal)
{
var att = node.Attributes[name];
if (att != null) return att.Value;
var child = node.SelectSingleNode(name);
if (child != null) return child.InnerText;
return dfltVal;
}
}
}