@Test public void nullSafeGetBooleanAttribute() throws XPathExpressionException { Node node = (Node) XPathFactory.newInstance().newXPath().evaluate("/test", doc, XPathConstants.NODE); assertTrue(XMLUtils.nullSafeGetBooleanAttribute(node, "boolVal")); assertFalse(XMLUtils.nullSafeGetBooleanAttribute(node, "chuckNorris")); }
public static boolean nullSafeGetBooleanAttribute(Node node, String attributeName) { return nullSafeGetBooleanAttribute(node, attributeName, false); }
XMLUtils { public static boolean nullSafeGetBooleanAttribute(Node node, String attributeName) { return nullSafeGetBooleanAttribute(node, attributeName, false); } }
XMLUtils { public static boolean nullSafeGetBooleanAttribute(Node node, String attributeName) { return nullSafeGetBooleanAttribute(node, attributeName, false); } private  XMLUtils(); }
XMLUtils { public static boolean nullSafeGetBooleanAttribute(Node node, String attributeName) { return nullSafeGetBooleanAttribute(node, attributeName, false); } private  XMLUtils(); static String nullSafeGetStringAttribute(Node node, String attributeName); static boolean nullSafeGetBooleanAttribute(Node node, String attributeName); static boolean nullSafeGetBooleanAttribute(Node node, String attributeName, boolean defaultValue); }
XMLUtils { public static boolean nullSafeGetBooleanAttribute(Node node, String attributeName) { return nullSafeGetBooleanAttribute(node, attributeName, false); } private  XMLUtils(); static String nullSafeGetStringAttribute(Node node, String attributeName); static boolean nullSafeGetBooleanAttribute(Node node, String attributeName); static boolean nullSafeGetBooleanAttribute(Node node, String attributeName, boolean defaultValue);  }