Package org.apache.wiki.htmltowiki

## Class XHtmlElementToWikiTranslator

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

    public class XHtmlElementToWikiTranslator
    extends java.lang.Object

Converting XHtml to Wiki Markup. This is the class which orchestrates all the heavy loading.

### Nested Class Summary

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

### Constructor Summary

Constructors
`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

All Methods Instance Methods Concrete Methods
`java.lang.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 Detail

#### XHtmlElementToWikiTranslator

    public XHtmlElementToWikiTranslator​(Engine e,
                                        org.jdom2.Element base)
                                 throws org.jdom2.JDOMException,
                                        java.lang.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.
  `java.lang.ReflectiveOperationException`

#### XHtmlElementToWikiTranslator

    public XHtmlElementToWikiTranslator​(Engine e,
                                        org.jdom2.Element base,
                                        XHtmlToWikiConfig config)
                                 throws org.jdom2.JDOMException,
                                        java.lang.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.
  `java.lang.ReflectiveOperationException`

### Method Detail

#### getWikiString

    public java.lang.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`