public class DefaultSAXElementSerializer extends Object implements SAXElementVisitor
Constructor and Description |
---|
DefaultSAXElementSerializer() |
Modifier and Type | Method and Description |
---|---|
boolean |
isStartWritten(SAXElement element) |
void |
onChildElement(SAXElement element,
SAXElement childElement,
ExecutionContext executionContext)
Process the onChildElement event for the targeted element.
|
void |
onChildText(SAXElement element,
SAXText text,
ExecutionContext executionContext)
Process the onChildText event for the targeted element.
|
void |
setRewriteEntities(boolean rewriteEntities) |
void |
setWriterOwner(SAXVisitor writerOwner) |
void |
visitAfter(SAXElement element,
ExecutionContext executionContext)
Visit the supplied element after visiting its child elements.
|
void |
visitBefore(SAXElement element,
ExecutionContext executionContext)
Visit the supplied element before visiting its child elements.
|
protected void |
writeEnd(SAXElement element) |
void |
writeEndElement(SAXElement element) |
protected void |
writeStart(SAXElement element) |
void |
writeStartElement(SAXElement element) |
public void setWriterOwner(SAXVisitor writerOwner)
@ConfigParam(name="entities.rewrite", defaultVal="true") public void setRewriteEntities(boolean rewriteEntities)
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException
SAXVisitBefore
visitBefore
in interface SAXVisitBefore
element
- The SAX element being visited.executionContext
- Execution context.SmooksException
- Event processing failure.IOException
- Error writing event to output writer.public void onChildText(SAXElement element, SAXText text, ExecutionContext executionContext) throws SmooksException, IOException
SAXVisitChildren
onChildText
in interface SAXVisitChildren
element
- The element containing the text (parent). The targeted element.text
- The text.executionContext
- Execution context.SmooksException
- Event processing failure.IOException
- Error writing event to output writer.public void onChildElement(SAXElement element, SAXElement childElement, ExecutionContext executionContext) throws SmooksException, IOException
SAXVisitChildren
onChildElement
in interface SAXVisitChildren
element
- The element containing the child element (parent). The targeted element.childElement
- The child element just added to the targeted element.executionContext
- Execution context.SmooksException
- Event processing failure.IOException
- Error writing event to output writer.public void visitAfter(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException
SAXVisitAfter
visitAfter
in interface SAXVisitAfter
element
- The SAX element being visited.executionContext
- Execution context.SmooksException
- Event processing failure.IOException
- Error writing event to output writer.public void writeStartElement(SAXElement element) throws IOException
IOException
public void writeEndElement(SAXElement element) throws IOException
IOException
protected void writeStart(SAXElement element) throws IOException
IOException
protected void writeEnd(SAXElement element) throws IOException
IOException
public boolean isStartWritten(SAXElement element)
Copyright © 2020. All rights reserved.