public class GhostElementSerializationUnit extends DefaultSerializationUnit implements SAXElementVisitor
Constructor and Description |
---|
GhostElementSerializationUnit() |
Modifier and Type | Method and Description |
---|---|
static Element |
createElement(Document ownerDocument)
Utility method for creating a <ghost-element/> element.
|
void |
onChildElement(SAXElement element,
SAXElement childElement,
ExecutionContext executionContext)
Process the onChildElement event for the targeted element.
|
void |
onChildText(SAXElement element,
SAXText childText,
ExecutionContext executionContext)
Process the onChildText event for the targeted element.
|
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.
|
void |
writeElementEnd(Element element,
Writer writer,
ExecutionContext executionContext)
Write the element end portion; close the element.
|
void |
writeElementStart(Element element,
Writer writer,
ExecutionContext executionContext)
Write the element start portion; the element name and it's
attributes.
|
isRewriteEntities, setCloseEmptyElements, setRewriteEntities, writeAttributes, writeChildElements, writeElementCDATA, writeElementComment, writeElementEnd, writeElementEntityRef, writeElementNode, writeElementStart, writeElementText
public void writeElementStart(Element element, Writer writer, ExecutionContext executionContext) throws IOException
SerializationUnit
writeElementStart
in interface SerializationUnit
writeElementStart
in class DefaultSerializationUnit
element
- The element start to write.writer
- The writer to be written to.executionContext
- ExecutionContext instance for the delivery context.IOException
- Exception writing output.public void writeElementEnd(Element element, Writer writer, ExecutionContext executionContext) throws IOException
SerializationUnit
writeElementEnd
in interface SerializationUnit
writeElementEnd
in class DefaultSerializationUnit
element
- The element end to write.writer
- The writer to be written to.executionContext
- ExecutionContext instance for the delivery context.IOException
- Exception writing output.public static Element createElement(Document ownerDocument)
ownerDocument
- The owner document.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 childText, ExecutionContext executionContext) throws SmooksException, IOException
SAXVisitChildren
onChildText
in interface SAXVisitChildren
element
- The element containing the text (parent). The targeted element.childText
- 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.Copyright © 2020. All rights reserved.