Class XmlTemplate
java.lang.Object
com.northconcepts.datapipeline.xml.builder.XmlNode
com.northconcepts.datapipeline.xml.builder.XmlNodeContainer
com.northconcepts.datapipeline.xml.builder.XmlFragment
com.northconcepts.datapipeline.xml.builder.XmlTemplate
Describes the XML an
XmlWriter produces: nodes before the XmlNodeContainer.detail() marker form the header, the
marker's nodes are written once per record and the remaining nodes form the footer.-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildDetail(Record record, CodeWriter writer) Writes the detail marker's nodes for the given record; throws aDataExceptionifbuildHeader(CodeWriter)found no detail marker.voidbuildFooter(CodeWriter writer) Writes the nodes after the detail marker, closing the elements the header opened.voidbuildHeader(CodeWriter writer) Writes the declaration and the nodes that come before the detail marker; call it once before writing records.Returns the text written verbatim on its own line before the template's nodes, typically an XML declaration (default is null, for none).setDeclaration(String declaration) Sets the text written verbatim on its own line before the template's nodes, typically an XML declaration (default is null, for none).voidSets a named value that the template's expressions, including per-record ones, can reference.voidSets a named value of the given type that the template's expressions, including per-record ones, can reference.Methods inherited from class com.northconcepts.datapipeline.xml.builder.XmlFragment
writeEndImpl, writeStartImplMethods inherited from class com.northconcepts.datapipeline.xml.builder.XmlNodeContainer
add, detail, element, getChildNodes, getLastChildNodeElementDepth, getNodes, hasChildNodes, text, whenMethods inherited from class com.northconcepts.datapipeline.xml.builder.XmlNode
getElementDepth, isMarker, writeEnd, writeStart
-
Constructor Details
-
XmlTemplate
public XmlTemplate()
-
-
Method Details
-
getDeclaration
Returns the text written verbatim on its own line before the template's nodes, typically an XML declaration (default is null, for none). -
setDeclaration
Sets the text written verbatim on its own line before the template's nodes, typically an XML declaration (default is null, for none). -
setValue
Sets a named value that the template's expressions, including per-record ones, can reference. -
setValue
Sets a named value of the given type that the template's expressions, including per-record ones, can reference. -
buildHeader
Writes the declaration and the nodes that come before the detail marker; call it once before writing records.- Throws:
IOException
-
buildDetail
Writes the detail marker's nodes for the given record; throws aDataExceptionifbuildHeader(CodeWriter)found no detail marker.- Throws:
IOException
-