public final class HTMLUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HTMLUtils.XWikiXMLOutputter
JDOM's XMLOutputter class converts reserved XML characters (<, >, ' , &, \r and \n) into their entity format
(<, > ' &
and \r\n).
|
| Modifier and Type | Method and Description |
|---|---|
static void |
stripFirstElementInside(Document document,
String parentTagName,
String elementTagName)
Remove the first element inside a parent element and copy the element's children in the parent.
|
static void |
stripHTMLEnvelope(Document document)
Strip the HTML envelope if it exists.
|
static String |
toString(Document document) |
static String |
toString(Document document,
boolean omitDeclaration,
boolean omitDoctype) |
public static String toString(Document document)
document - the W3C Document to transform into a Stringpublic static String toString(Document document, boolean omitDeclaration, boolean omitDoctype)
document - the W3C Document to transform into a StringomitDeclaration - whether the XML declaration should be printed or notomitDoctype - whether the document type should be printed or notpublic static void stripHTMLEnvelope(Document document)
document - the w3c Document to strippublic static void stripFirstElementInside(Document document, String parentTagName, String elementTagName)
document - the w3c document from which to remove the top level paragraphparentTagName - the name of the parent tag to look underelementTagName - the name of the first element to removeCopyright © 2004–2015 XWiki. All rights reserved.