public class HtmlStringToWikiTranslator extends java.lang.Object
| Constructor and Description |
|---|
HtmlStringToWikiTranslator(Engine e)
Create a new translator.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
element2String(org.jdom2.Element element)
A static helper method to create HTML from an Element.
|
java.lang.String |
translate(java.lang.String html)
Translates text from HTML into WikiMarkup without a WikiContext (meaning
some things perhaps cannot be translated).
|
java.lang.String |
translate(java.lang.String html,
Context wikiContext)
Translates text from HTML into WikiMarkup with a WikiContext.
|
java.lang.String |
translate(java.lang.String html,
XHtmlToWikiConfig config)
Translates text from HTML into WikiMarkup using a specified configuration.
|
public HtmlStringToWikiTranslator(Engine e)
public java.lang.String translate(java.lang.String html) throws org.jdom2.JDOMException, java.io.IOException, java.lang.ReflectiveOperationException
html - HTML text to translateorg.jdom2.JDOMException - If parsing failsjava.io.IOException - For other kinds of errors.java.lang.ReflectiveOperationExceptionpublic java.lang.String translate(java.lang.String html, Context wikiContext) throws org.jdom2.JDOMException, java.io.IOException, java.lang.ReflectiveOperationException
html - HTML text to translatewikiContext - The WikiContext to use.org.jdom2.JDOMException - If parsing failsjava.io.IOException - For other kinds of errors.java.lang.ReflectiveOperationExceptionpublic java.lang.String translate(java.lang.String html, XHtmlToWikiConfig config) throws org.jdom2.JDOMException, java.io.IOException, java.lang.ReflectiveOperationException
html - HTML text to translateconfig - The configuration to use.org.jdom2.JDOMException - If parsing failsjava.io.IOException - For other kinds of errors.java.lang.ReflectiveOperationExceptionpublic static java.lang.String element2String(org.jdom2.Element element)
element - The element to get HTML from.Copyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.