Class XmlNodeContainer
java.lang.Object
com.northconcepts.datapipeline.xml.builder.XmlNode
com.northconcepts.datapipeline.xml.builder.XmlNodeContainer
- Direct Known Subclasses:
XmlConditionalNode,XmlElement,XmlFragment
Base class for template nodes with children; provides the
element(String), text(String),
when(String) and detail() builder methods.-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends XmlNode>
Tadd(T node) Appends the node as a child and returns the added node.final XmlNodeContainerdetail()Adds and returns the detail marker; the nodes added to it are written once for each record.final XmlElementAdds and returns a child element named by the given expression; quote a fixed name, as in'actor'.getChildNodes(ExpressionContext context) Returns the children to write in the given context, or null for leaf nodes and for conditional nodes whose condition is false.intReturns the element depth of the last child node, looking inside non-element children, or this node's own depth if it has none.getNodes()booleanhasChildNodes(ExpressionContext context) Returns true if this node has children to write in the given context; a conditional node also requires its condition.final XmlNodeContainerAdds text computed from the given expression, written XML-escaped, and returns this container (not the text node).final XmlConditionalNodeAdds and returns a group of nodes written only when the given logical expression is true.Methods inherited from class com.northconcepts.datapipeline.xml.builder.XmlNode
getElementDepth, isMarker, writeEnd, writeEndImpl, writeStart, writeStartImpl
-
Constructor Details
-
XmlNodeContainer
-
-
Method Details
-
getNodes
-
getLastChildNodeElementDepth
public int getLastChildNodeElementDepth()Description copied from class:XmlNodeReturns the element depth of the last child node, looking inside non-element children, or this node's own depth if it has none.- Overrides:
getLastChildNodeElementDepthin classXmlNode
-
hasChildNodes
public boolean hasChildNodes(ExpressionContext context) Description copied from class:XmlNodeReturns true if this node has children to write in the given context; a conditional node also requires its condition.- Overrides:
hasChildNodesin classXmlNode
-
getChildNodes
Description copied from class:XmlNodeReturns the children to write in the given context, or null for leaf nodes and for conditional nodes whose condition is false.- Overrides:
getChildNodesin classXmlNode
-
add
Appends the node as a child and returns the added node. -
when
Adds and returns a group of nodes written only when the given logical expression is true. -
element
Adds and returns a child element named by the given expression; quote a fixed name, as in'actor'. -
text
Adds text computed from the given expression, written XML-escaped, and returns this container (not the text node). -
detail
Adds and returns the detail marker; the nodes added to it are written once for each record.
-