Interface HtmlProcessor
-
- All Superinterfaces:
Serializable
public interface HtmlProcessor extends Serializable
Processes HTML that is meant to be read from or written to the repository. It can be used to fix malformed HTML, remove unwanted elements and attributes, and transform elements into a representation needed by the CMS, e.g. images and internal links. The process applied is: 1. Parse HTML into DOM tree 2. Apply visitors to DOM tree 3. Serialize DOM tree as string
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
read(String html, List<TagVisitor> visitors)
Process stored HTML.String
write(String html, List<TagVisitor> visitors)
Process HTML to store.
-
-
-
Method Detail
-
read
String read(String html, List<TagVisitor> visitors) throws IOException
Process stored HTML.- Parameters:
html
- The stored HTMLvisitors
- Visitors applied to the DOM tree- Returns:
- Processed HTML
- Throws:
IOException
- when the DOM tree cannot be serialized
-
write
String write(String html, List<TagVisitor> visitors) throws IOException
Process HTML to store.- Parameters:
html
- The HTML to be storedvisitors
- Visitors applied to the DOM tree- Returns:
- Processed HTML
- Throws:
IOException
- when the DOM tree cannot be serialized
-
-