Added GetElementValue() to allow retrieving an element value if present, otherwise a default value
This commit is contained in:
parent
bc207b855c
commit
76b3a77d13
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user