List of usage examples for org.dom4j.io SAXWriter writeOpen
public void writeOpen(Element element) throws SAXException
Writes the opening tag of an Element , including its Attribute s but without its content.
From source file:org.apache.commons.jelly.tags.xml.CopyTag.java
License:Apache License
public void doTag(XMLOutput output) throws JellyTagException { Object xpathContext = getXPathContext(); Object node = xpathContext;/* w w w.j a va 2 s . c om*/ try { if (select != null) { node = select.selectSingleNode(xpathContext); } if (node instanceof Element) { Element element = (Element) node; SAXWriter saxWriter; if (lexical) { saxWriter = new SAXWriter(output, output); } else { saxWriter = new SAXWriter(output); } saxWriter.writeOpen(element); invokeBody(output); saxWriter.writeClose(element); } else { invokeBody(output); } } catch (SAXException e) { throw new JellyTagException(e); } catch (JaxenException e) { throw new JellyTagException(e); } }