diff --git a/li.strolch.utils/src/main/java/li/strolch/utils/helper/XmlHelper.java b/li.strolch.utils/src/main/java/li/strolch/utils/helper/XmlHelper.java index 0bab0fc6c..68a19836f 100644 --- a/li.strolch.utils/src/main/java/li/strolch/utils/helper/XmlHelper.java +++ b/li.strolch.utils/src/main/java/li/strolch/utils/helper/XmlHelper.java @@ -15,6 +15,9 @@ */ package li.strolch.utils.helper; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.annotation.XmlRootElement; import javax.xml.parsers.*; import javax.xml.transform.OutputKeys; import javax.xml.transform.Source; @@ -129,6 +132,37 @@ public class XmlHelper { } } + /** + *
Helper method to parse the given {@link File} using JAXB to the given object type
+ * + *Note: The passed class must have the {@link XmlRootElement} annotation!
+ * + * @param file + * the file to parse + * @param clazz + * the class for the returning object type + * @param