
com.radioreference.api.XmlHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of radio-reference-api Show documentation
Show all versions of radio-reference-api Show documentation
Java library to use the RadioReference.com API
The newest version!
package com.radioreference.api;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.core.Persister;
import java.io.InputStream;
public class XmlHelper {
private static final Serializer SERIALIZER = new Persister();
public static T fromXml(Class extends T> clazz, InputStream xml) {
try {
Object result = SERIALIZER.read(clazz, xml, false);
return (T) result;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy