Class XmlConfigHelper
- java.lang.Object
-
- org.infinispan.configuration.parsing.XmlConfigHelper
-
public class XmlConfigHelper extends Object
A simple XML utility class for reading configuration elements- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org)
-
-
Constructor Summary
Constructors Constructor Description XmlConfigHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<Object,Object>
setAttributes(AttributeSet attributes, Map<?,?> attribs, boolean isXmlAttribs, boolean failOnMissingAttribute)
static Map<Object,Object>
setValues(Object target, Map<?,?> attribs, boolean isXmlAttribs, boolean failOnMissingSetter)
static void
showUnrecognizedAttributes(Map<Object,Object> attribs)
static Element
stringToElement(String xml)
Converts a String representing an XML snippet into anElement
.static String
toString(Element e)
static Object
valueConverter(Class klass, String value)
-
-
-
Method Detail
-
stringToElement
public static Element stringToElement(String xml) throws Exception
Converts a String representing an XML snippet into anElement
.- Parameters:
xml
- snippet as a string- Returns:
- a DOM Element
- Throws:
Exception
- if unable to parse the String or if it doesn't contain valid XML.
-
setAttributes
public static Map<Object,Object> setAttributes(AttributeSet attributes, Map<?,?> attribs, boolean isXmlAttribs, boolean failOnMissingAttribute)
-
setValues
public static Map<Object,Object> setValues(Object target, Map<?,?> attribs, boolean isXmlAttribs, boolean failOnMissingSetter)
-
showUnrecognizedAttributes
public static void showUnrecognizedAttributes(Map<Object,Object> attribs)
-
-