diff --git a/generator/Makefile.am b/generator/Makefile.am
index ca061f05d..93bb48465 100644
--- a/generator/Makefile.am
+++ b/generator/Makefile.am
@@ -61,7 +61,8 @@ sources = \
StructGen.cs \
SymbolTable.cs \
VirtualMethod.cs \
- VMSignature.cs
+ VMSignature.cs \
+ XmlElementExtensions.cs
build_sources = $(addprefix $(srcdir)/, $(sources))
dist_sources = $(sources)
diff --git a/generator/XmlElementExtensions.cs b/generator/XmlElementExtensions.cs
new file mode 100644
index 000000000..4bb4c4c40
--- /dev/null
+++ b/generator/XmlElementExtensions.cs
@@ -0,0 +1,20 @@
+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);
+ }
+ }
+ }
+}
+
diff --git a/generator/generator.csproj b/generator/generator.csproj
index f0b331439..ccf39f985 100644
--- a/generator/generator.csproj
+++ b/generator/generator.csproj
@@ -87,9 +87,14 @@
+
+
+
+
+
\ No newline at end of file