result = new SimpleScalar(node.getNodeName()); } else if ("children".equals(key)) { result = new NodeListTM(node.getChildNodes()); } else if ("parent".equals(key)) { Node parent = node.getParentNode();
result = new NodeListTM(node.getChildNodes());
result = new SimpleScalar(node.getNodeName()); } else if ("children".equals(key)) { result = new NodeListTM(node.getChildNodes()); } else if ("parent".equals(key)) { Node parent = node.getParentNode();
result = new SimpleScalar(node.getNodeName()); } else if ("children".equals(key)) { result = new NodeListTM(node.getChildNodes()); } else if ("parent".equals(key)) { Node parent = node.getParentNode();
public Object exec(List arguments) throws TemplateModelException { if (arguments.size() != 1) { throw new TemplateModelException("Expecting exactly one string argument here"); } if (!(node instanceof Element)) { throw new TemplateModelException("Expecting element here."); } Element elem = (Element) node; return new NodeListTM(elem.getElementsByTagName((String) arguments.get(0))); } }
public Object exec(List arguments) throws TemplateModelException { if (arguments.size() != 1) { throw new TemplateModelException("Expecting exactly one string argument here"); } if (!(node instanceof Element)) { throw new TemplateModelException("Expecting element here."); } Element elem = (Element) node; return new NodeListTM(elem.getElementsByTagName((String) arguments.get(0))); } }
public Object exec(List arguments) throws TemplateModelException { if (arguments.size() != 1) { throw new TemplateModelException("Expecting exactly one string argument here"); } if (!(node instanceof Element)) { throw new TemplateModelException("Expecting element here."); } Element elem = (Element) node; return new NodeListTM(elem.getElementsByTagName((String) arguments.get(0))); } }
public Object exec(List arguments) throws TemplateModelException { if (arguments.size() != 1) { throw new TemplateModelException("Expecting exactly one string argument here"); } if (!(node instanceof Element)) { throw new TemplateModelException("Expecting element here."); } Element elem = (Element) node; return new NodeListTM(elem.getElementsByTagName((String) arguments.get(0))); } }