public class XmlPropertyResolver extends SimplePropertyResolver
The resolver tries to search for an element with a given property name. If none is found it tries to interpret dots (".") as separator between parent and children element names. For instance for document:
<a>
<b>
<c>test</c>
</b>
<e><f>test3</f></e>
<e.f>test2</e.f>
</a>
property ${a.b.c} will return 'test' value and property ${a.e.f} will return 'test2' value.
filterResult| Constructor and Description |
|---|
XmlPropertyResolver(Element rootElement,
boolean matchRoot)
Create new property resolver based on XML tree.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getProperty(String name)
Returns property value which will be optionally filtered for any properties.
|
resolveProperty, setFilterResultpublic XmlPropertyResolver(@Nullable Element rootElement, boolean matchRoot)
rootElement - root element of an XML tree to search for property valuematchRoot - whether root element should match, or matching should start from rootElement childrenpublic String getProperty(String name) throws PropertyNotFoundException
SimplePropertyResolverPropertyResolver.resolveProperty(String, PropertyResolver).getProperty in class SimplePropertyResolverPropertyNotFoundExceptionCopyright © 2013 Atteo. All Rights Reserved.