Class XmlConfigHelper

    • Constructor Detail

      • XmlConfigHelper

        public XmlConfigHelper()
    • Method Detail

      • stringToElement

        public static Element stringToElement​(String xml)
                                       throws Exception
        Converts a String representing an XML snippet into an Element.
        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.
      • valueConverter

        public static Object valueConverter​(Class klass,
                                            String value)
      • 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)