GtkSharp/Source/Tools/GapiCodegen/XmlElementExtensions.cs
2017-10-23 01:25:13 +02:00

20 lines
361 B
C#
Executable file

using System;
using System.Xml;
namespace GtkSharp.Generation
{
public static class XmlElementExtensions
{
public static bool GetAttributeAsBoolean (this XmlElement elt, string name)
{
string value = elt.GetAttribute (name);
if (String.IsNullOrEmpty (value)) {
return false;
} else {
return XmlConvert.ToBoolean (value);
}
}
}
}