Package org.apache.wiki.htmltowiki

# Class XHtmlElementToWikiTranslator

java.lang.Object
org.apache.wiki.htmltowiki.XHtmlElementToWikiTranslator

public class XHtmlElementToWikiTranslator extends Object
Converting XHtml to Wiki Markup. This is the class which orchestrates all the heavy loading.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`XHtmlElementToWikiTranslator.ElementDecoratorData`
Simple data placeholder class to move decoration state between plain text syntax translation related classes.

## Constructor Summary

Constructors
Constructor
Description
`XHtmlElementToWikiTranslator(Engine e, org.jdom2.Element base)`
Create a new translator using the default config.
`XHtmlElementToWikiTranslator(Engine e, org.jdom2.Element base, XHtmlToWikiConfig config)`
Create a new translator using the specified config.

## Method Summary

Modifier and Type
Method
Description
`String`
`getWikiString()`
Outputs parsed wikitext.
`void`
`translate(org.jdom2.Content element)`
`void`
`translateChildren(org.jdom2.Element base)`
`void`
`translateImage(org.jdom2.Element base)`
`void`
`translateParagraph(org.jdom2.Element base)`
`void`
`translateText(org.jdom2.Text element)`

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

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

## Constructor Details

### XHtmlElementToWikiTranslator

public XHtmlElementToWikiTranslator(Engine e, org.jdom2.Element base) throws org.jdom2.JDOMException, ReflectiveOperationException
Create a new translator using the default config.

Parameters:
  `base` - The base element from which to start translating.
Throws:
  `org.jdom2.JDOMException` - If the DOM tree is faulty.
  `ReflectiveOperationException`

### XHtmlElementToWikiTranslator

public XHtmlElementToWikiTranslator(Engine e, org.jdom2.Element base, XHtmlToWikiConfig config) throws org.jdom2.JDOMException, ReflectiveOperationException
Create a new translator using the specified config.

Parameters:
  `base` - The base element from which to start translating.
  `config` - The config to use.
Throws:
  `org.jdom2.JDOMException` - If the DOM tree is faulty.
  `ReflectiveOperationException`

## Method Details

### getWikiString

public String getWikiString()
Outputs parsed wikitext.

Returns:
  parsed wikitext.

### translate

public void translate(org.jdom2.Content element) throws org.jdom2.JDOMException

Throws:
  `org.jdom2.JDOMException`

### translateText

public void translateText(org.jdom2.Text element)

### translateImage

public void translateImage(org.jdom2.Element base)

### translateChildren

public void translateChildren(org.jdom2.Element base) throws org.jdom2.JDOMException

Throws:
  `org.jdom2.JDOMException`

### translateParagraph

public void translateParagraph(org.jdom2.Element base) throws org.jdom2.JDOMException

Throws:
  `org.jdom2.JDOMException`