Added GetElementValue() to allow retrieving an element value if present, otherwise a default value

This commit is contained in:
Michael Becker 2014-07-05 18:14:27 -04:00
parent bc207b855c
commit 76b3a77d13

View File

@ -133,5 +133,12 @@ namespace UniversalEditor.ObjectModels.Markup
}
return tagParent;
}
public string GetElementValue(string[] path, string defaultValue = null)
{
MarkupTagElement tag = (FindElement(path) as MarkupTagElement);
if (tag == null) return defaultValue;
return tag.Value;
}
}
}