static Resource CreateResource (XmlReader reader)
{
int n = reader.AttributeCount;
string path = reader.GetAttribute ("path");
if (path != null)
n--;
string subpaths = reader.GetAttribute ("include-subpaths");
if (subpaths != null)
n--;
if ((n != 0) || !reader.IsEmptyElement)
return null;
return new Resource () {
Path = path,
IncludeSubpaths = subpaths == null ? false : XmlConvert.ToBoolean (subpaths)
};
}