/** * @param node * @param attr * @return True if the attribute exists and is not equal to "false" * false otherwise. */ public static boolean getBoolAttribute(Node node, String attr) { return getBoolAttribute(node, attr, false); }
/** * @param node * @param attr * @return True if the attribute exists and is not equal to "false" * false otherwise. */ public static boolean getBoolAttribute(Node node, String attr) { return getBoolAttribute(node, attr, false); }
/** * @param node * @param attr * @return True if the attribute exists and is not equal to "false" * false otherwise. */ public static boolean getBoolAttribute(Node node, String attr) { return getBoolAttribute(node, attr, false); }
/** * @param node * @param attr * @return True if the attribute exists and is not equal to "false" * false otherwise. */ public static boolean getBoolAttribute(Node node, String attr) { return getBoolAttribute(node, attr, false); }
/** * @param node * @param attr * @return True if the attribute exists and is not equal to "false" * false otherwise. */ public static boolean getBoolAttribute(Node node, String attr) { return getBoolAttribute(node, attr, false); }
signOwner = XmlUtil.getBoolAttribute(preload, "sign_owner", true); signViewer = XmlUtil.getBoolAttribute(preload, "sign_viewer", true); Map<String, String> attributes = Maps.newHashMap(); NamedNodeMap attrs = preload.getAttributes();
signOwner = XmlUtil.getBoolAttribute(preload, "sign_owner", true); signViewer = XmlUtil.getBoolAttribute(preload, "sign_viewer", true); Map<String, String> attributes = Maps.newHashMap(); NamedNodeMap attrs = preload.getAttributes();
signOwner = XmlUtil.getBoolAttribute(preload, "sign_owner", true); signViewer = XmlUtil.getBoolAttribute(preload, "sign_viewer", true); Map<String, String> attributes = Maps.newHashMap(); NamedNodeMap attrs = preload.getAttributes();
@Test public void getBoolAttribute() { assertTrue(XmlUtil.getBoolAttribute(node, BOOL_TRUE_ATTR)); assertFalse(XmlUtil.getBoolAttribute(node, BOOL_FALSE_ATTR)); assertTrue(XmlUtil.getBoolAttribute(node, FAKE_ATTR, true)); assertFalse(XmlUtil.getBoolAttribute(node, FAKE_ATTR, false)); assertFalse("getBoolAttribute must return false for undefined attributes.", XmlUtil.getBoolAttribute(node, FAKE_ATTR)); }
@Test public void getBoolAttribute() { assertTrue(XmlUtil.getBoolAttribute(node, BOOL_TRUE_ATTR)); assertFalse(XmlUtil.getBoolAttribute(node, BOOL_FALSE_ATTR)); assertTrue(XmlUtil.getBoolAttribute(node, FAKE_ATTR, true)); assertFalse(XmlUtil.getBoolAttribute(node, FAKE_ATTR, false)); assertFalse("getBoolAttribute must return false for undefined attributes.", XmlUtil.getBoolAttribute(node, FAKE_ATTR)); }
@Test public void getBoolAttribute() { assertTrue(XmlUtil.getBoolAttribute(node, BOOL_TRUE_ATTR)); assertFalse(XmlUtil.getBoolAttribute(node, BOOL_FALSE_ATTR)); assertTrue(XmlUtil.getBoolAttribute(node, FAKE_ATTR, true)); assertFalse(XmlUtil.getBoolAttribute(node, FAKE_ATTR, false)); assertFalse("getBoolAttribute must return false for undefined attributes.", XmlUtil.getBoolAttribute(node, FAKE_ATTR)); }
@Test public void getBoolAttribute() { assertTrue(XmlUtil.getBoolAttribute(node, BOOL_TRUE_ATTR)); assertFalse(XmlUtil.getBoolAttribute(node, BOOL_FALSE_ATTR)); assertTrue(XmlUtil.getBoolAttribute(node, FAKE_ATTR, true)); assertFalse(XmlUtil.getBoolAttribute(node, FAKE_ATTR, false)); assertFalse("getBoolAttribute must return false for undefined attributes.", XmlUtil.getBoolAttribute(node, FAKE_ATTR)); }
@Test public void getBoolAttribute() { assertTrue(XmlUtil.getBoolAttribute(node, BOOL_TRUE_ATTR)); assertFalse(XmlUtil.getBoolAttribute(node, BOOL_FALSE_ATTR)); assertTrue(XmlUtil.getBoolAttribute(node, FAKE_ATTR, true)); assertFalse(XmlUtil.getBoolAttribute(node, FAKE_ATTR, false)); assertFalse("getBoolAttribute must return false for undefined attributes.", XmlUtil.getBoolAttribute(node, FAKE_ATTR)); }
required = XmlUtil.getBoolAttribute(element, "required");
required = XmlUtil.getBoolAttribute(element, "required");
required = XmlUtil.getBoolAttribute(element, "required");
quirks = XmlUtil.getBoolAttribute(element, "quirks", quirks); preferredHeight = XmlUtil.getIntAttribute(element, "preferred_height"); preferredWidth = XmlUtil.getIntAttribute(element, "preferred_width"); auth = XmlUtil.getAttribute(element, "authz", auth); signOwner = XmlUtil.getBoolAttribute(element, "sign_owner", signOwner); signViewer = XmlUtil.getBoolAttribute(element, "sign_viewer", signViewer); content.append(element.getTextContent()); NamedNodeMap attrs = element.getAttributes();
quirks = XmlUtil.getBoolAttribute(element, "quirks", quirks); preferredHeight = XmlUtil.getIntAttribute(element, "preferred_height"); preferredWidth = XmlUtil.getIntAttribute(element, "preferred_width"); auth = XmlUtil.getAttribute(element, "authz", auth); signOwner = XmlUtil.getBoolAttribute(element, "sign_owner", signOwner); signViewer = XmlUtil.getBoolAttribute(element, "sign_viewer", signViewer); content.append(element.getTextContent()); NamedNodeMap attrs = element.getAttributes();
quirks = XmlUtil.getBoolAttribute(element, "quirks", quirks); preferredHeight = XmlUtil.getIntAttribute(element, "preferred_height"); preferredWidth = XmlUtil.getIntAttribute(element, "preferred_width"); auth = XmlUtil.getAttribute(element, "authz", auth); signOwner = XmlUtil.getBoolAttribute(element, "sign_owner", signOwner); signViewer = XmlUtil.getBoolAttribute(element, "sign_viewer", signViewer); content.append(element.getTextContent()); NamedNodeMap attrs = element.getAttributes();