org.codehaus.staxmate.out.SMOEntityRef Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of staxmate Show documentation
Show all versions of staxmate Show documentation
StaxMate is a light-weight framework that adds convenience to streaming XML-processing without significant additional overhead.
It builds on top of a Stax (JSR-173) compliant XML processors such as Woodstox or Sjsxp (default Stax implementation of JDK 1.6) and offers two basic abstractions: Cursors, which build on XMLStreamReaders and Output objects, which build on XMLStreamWriters.
package org.codehaus.staxmate.out;
import javax.xml.stream.XMLStreamException;
public class SMOEntityRef
extends SMSimpleOutput
{
final String mName;
public SMOEntityRef(String name) {
super();
mName = name;
}
protected boolean _output(SMOutputContext ctxt, boolean canClose)
throws XMLStreamException
{
ctxt.writeEntityRef(mName);
return true;
}
}