static class XMLConfiguration.XMLBuilderVisitor extends HierarchicalConfiguration.BuilderVisitor
BuilderVisitor
that can construct XML
documents.Modifier and Type | Field and Description |
---|---|
private org.w3c.dom.Document |
document
Stores the document to be constructed.
|
private char |
listDelimiter
Stores the list delimiter.
|
Constructor and Description |
---|
XMLConfiguration.XMLBuilderVisitor(org.w3c.dom.Document doc,
char listDelimiter)
Creates a new instance of
XMLBuilderVisitor |
Modifier and Type | Method and Description |
---|---|
private org.w3c.dom.Element |
getElement(HierarchicalConfiguration.Node node)
Helper method for accessing the element of the specified node.
|
protected java.lang.Object |
insert(HierarchicalConfiguration.Node newNode,
HierarchicalConfiguration.Node parent,
HierarchicalConfiguration.Node sibling1,
HierarchicalConfiguration.Node sibling2)
Inserts a new node.
|
void |
processDocument(HierarchicalConfiguration.Node rootNode)
Processes the node hierarchy and adds new nodes to the document.
|
private static void |
updateAttribute(HierarchicalConfiguration.Node node,
org.w3c.dom.Element elem,
java.lang.String name,
char listDelimiter)
Helper method for updating the value of the specified node's
attribute with the given name.
|
(package private) static void |
updateAttribute(HierarchicalConfiguration.Node node,
java.lang.String name,
char listDelimiter)
Updates the value of the specified attribute of the given node.
|
visitBeforeChildren
terminate, visitAfterChildren
private org.w3c.dom.Document document
private char listDelimiter
public XMLConfiguration.XMLBuilderVisitor(org.w3c.dom.Document doc, char listDelimiter)
XMLBuilderVisitor
doc
- the document to be createdlistDelimiter
- the delimiter for attribute properties with multiple valuespublic void processDocument(HierarchicalConfiguration.Node rootNode)
rootNode
- the root nodeprotected java.lang.Object insert(HierarchicalConfiguration.Node newNode, HierarchicalConfiguration.Node parent, HierarchicalConfiguration.Node sibling1, HierarchicalConfiguration.Node sibling2)
insert
in class HierarchicalConfiguration.BuilderVisitor
newNode
- the node to insertparent
- the parent nodesibling1
- the first siblingsibling2
- the second siblingprivate static void updateAttribute(HierarchicalConfiguration.Node node, org.w3c.dom.Element elem, java.lang.String name, char listDelimiter)
node
- the affected nodeelem
- the element that is associated with this nodename
- the name of the affected attributelistDelimiter
- the delimiter vor attributes with multiple valuesstatic void updateAttribute(HierarchicalConfiguration.Node node, java.lang.String name, char listDelimiter)
node
- the affected nodename
- the name of the attributelistDelimiter
- the delimiter vor attributes with multiple valuesprivate org.w3c.dom.Element getElement(HierarchicalConfiguration.Node node)
node
- the node