com.abubusoft.kripton.xml.XmlAttributeUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kripton-core Show documentation
Show all versions of kripton-core Show documentation
Kripton Persistence Library - core module
package com.abubusoft.kripton.xml;
import com.abubusoft.kripton.common.StringUtils;
/**
* @author Francesco Benincasa ([email protected])
*
*/
public class XmlAttributeUtils {
public static boolean getAttributeAsBoolean(XmlPullParser parser, String attributeName, boolean defaultValue) throws Exception
{
//parser.getText()
String value=parser.getAttributeValue(null, attributeName);
if (!StringUtils.hasText(value))
{
return defaultValue;
}
return Boolean.parseBoolean(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy