1 package com.instantbank.collections.main.web;
2
3 import javax.servlet.jsp.JspException;
4 import javax.servlet.jsp.tagext.TagSupport;
5 import org.w3c.dom.Node;
6
7 public class IfNodeIsElementTag extends TagSupport {
8 private Node node = null;
9
10
11 public void setNode(Node node) {
12 this.node = node;
13 }
14
15
16 public int doStartTag() throws JspException {
17 return node.getNodeType() == Node.ELEMENT_NODE ? EVAL_BODY_INCLUDE : SKIP_BODY;
18 }
19
20
21 public void release() {
22 this.node = null;
23 }
24 }
25
26