Package org.eclipse.net4j.util.collection

# Class Tree.XMLConverter

java.lang.Object
org.eclipse.net4j.util.collection.Tree.XMLConverter

All Implemented Interfaces:
  `BiFunction<Tree,Element,Element>`

Enclosing class:
  Tree

public static class Tree.XMLConverter extends Object implements BiFunction<Tree,Element,Element>

Author:
  Eike Stepper

## Constructor Summary

Constructors
Constructor
Description
`XMLConverter()`
`XMLConverter(DocumentBuilder documentBuilder)`
`XMLConverter(DocumentBuilderFactory documentBuilderFactory)`
`XMLConverter(Document document)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`appendElement(Tree tree, Element element, Element parentElement)`
`Element`
`apply(Tree tree, Element parentElement)`
`static Tree`
`convertDocumentToTree(Document document)`
`static Tree`
`convertDocumentToTree(Document document, Map<String,String> parameters)`
`static Tree`
`convertElementToTree(Element element)`
`static Tree`
`convertElementToTree(Element element, Map<String,String> parameters)`
`static Document`
`convertTreeToDocument(Tree tree)`
`static Element`
`convertTreeToElement(Tree tree)`
`protected Element`
`createElement(Tree tree)`
`final Document`
`document()`
`protected String`
`getTagName(Tree tree)`
`protected void`
`setAttribute(Tree tree, Element element, String name, String value)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.BiFunction

`andThen`

## Constructor Details

### XMLConverter

public XMLConverter(Document document)

### XMLConverter

public XMLConverter(DocumentBuilder documentBuilder)

### XMLConverter

public XMLConverter(DocumentBuilderFactory documentBuilderFactory) throws ParserConfigurationException

Throws:
  `ParserConfigurationException`

### XMLConverter

public XMLConverter() throws ParserConfigurationException

Throws:
  `ParserConfigurationException`

## Method Details

### document

public final Document document()

### apply

public Element apply(Tree tree, Element parentElement)

Specified by:
  `apply` in interface `BiFunction<Tree,Element,Element>`

### createElement

protected Element createElement(Tree tree)

### appendElement

protected void appendElement(Tree tree, Element element, Element parentElement)

### setAttribute

protected void setAttribute(Tree tree, Element element, String name, String value)

### getTagName

protected String getTagName(Tree tree)

### convertTreeToDocument

public static Document convertTreeToDocument(Tree tree) throws ParserConfigurationException

Throws:
  `ParserConfigurationException`

### convertTreeToElement

public static Element convertTreeToElement(Tree tree) throws ParserConfigurationException

Throws:
  `ParserConfigurationException`

### convertDocumentToTree

public static Tree convertDocumentToTree(Document document)

### convertDocumentToTree

public static Tree convertDocumentToTree(Document document, Map<String,String> parameters)

### convertElementToTree

public static Tree convertElementToTree(Element element)

### convertElementToTree

public static Tree convertElementToTree(Element element, Map<String,String> parameters)