Package jodd.lagarto.dom.render
Class LagartoHtmlRendererNodeVisitor
- java.lang.Object
-
- jodd.lagarto.dom.render.LagartoHtmlRendererNodeVisitor
-
- All Implemented Interfaces:
NodeVisitor
public class LagartoHtmlRendererNodeVisitor extends java.lang.Object implements NodeVisitor
NodeVisitorthat renders DOM tree to string.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLagartoHtmlRendererNodeVisitor.CaseEnumeration of case options for output name.
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Appendableappendableprotected LagartoHtmlRendererNodeVisitor.CaseattributeCaseLetter case of attributes names.protected LagartoHtmlRendererNodeVisitor.CasetagCaseLetter case of tag names.
-
Constructor Summary
Constructors Constructor Description LagartoHtmlRendererNodeVisitor(java.lang.Appendable appendable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_element(Element element)voidcdata(CData cdata)voidcomment(Comment comment)voiddocument(Document document)voiddocumentType(DocumentType documentType)voidelement(Element element)protected voidelementBody(Element element)LagartoHtmlRendererNodeVisitor.CasegetAttributeCase()LagartoHtmlRendererNodeVisitor.CasegetTagCase()protected voidrenderAttribute(Node node, Attribute attribute, java.lang.Appendable appendable)Renders attribute.voidreset()Resets all cases to default.protected java.lang.StringresolveAttributeName(Node node, Attribute attribute)Renders attribute name.protected java.lang.StringresolveNodeName(Node node)Renders node name.voidsetAttributeCase(LagartoHtmlRendererNodeVisitor.Case attributeCase)Setscaseof attribute names.voidsetTagCase(LagartoHtmlRendererNodeVisitor.Case tagCase)Setscaseof tag names.voidtext(Text text)voidxmlDeclaration(XmlDeclaration xmlDeclaration)
-
-
-
Field Detail
-
appendable
protected final java.lang.Appendable appendable
-
tagCase
protected LagartoHtmlRendererNodeVisitor.Case tagCase
Letter case of tag names.
-
attributeCase
protected LagartoHtmlRendererNodeVisitor.Case attributeCase
Letter case of attributes names.
-
-
Method Detail
-
cdata
public void cdata(CData cdata)
- Specified by:
cdatain interfaceNodeVisitor
-
comment
public void comment(Comment comment)
- Specified by:
commentin interfaceNodeVisitor
-
document
public void document(Document document)
- Specified by:
documentin interfaceNodeVisitor
-
documentType
public void documentType(DocumentType documentType)
- Specified by:
documentTypein interfaceNodeVisitor
-
text
public void text(Text text)
- Specified by:
textin interfaceNodeVisitor
-
xmlDeclaration
public void xmlDeclaration(XmlDeclaration xmlDeclaration)
- Specified by:
xmlDeclarationin interfaceNodeVisitor
-
setTagCase
public void setTagCase(LagartoHtmlRendererNodeVisitor.Case tagCase)
Setscaseof tag names.
-
getTagCase
public LagartoHtmlRendererNodeVisitor.Case getTagCase()
-
setAttributeCase
public void setAttributeCase(LagartoHtmlRendererNodeVisitor.Case attributeCase)
Setscaseof attribute names.
-
getAttributeCase
public LagartoHtmlRendererNodeVisitor.Case getAttributeCase()
-
reset
public void reset()
Resets all cases to default.
-
resolveNodeName
protected java.lang.String resolveNodeName(Node node)
Renders node name.
-
resolveAttributeName
protected java.lang.String resolveAttributeName(Node node, Attribute attribute)
Renders attribute name.
-
renderAttribute
protected void renderAttribute(Node node, Attribute attribute, java.lang.Appendable appendable) throws java.io.IOException
Renders attribute.- Throws:
java.io.IOException
-
element
public void element(Element element)
- Specified by:
elementin interfaceNodeVisitor
-
_element
protected void _element(Element element) throws java.io.IOException
- Throws:
java.io.IOException
-
elementBody
protected void elementBody(Element element) throws java.io.IOException
- Throws:
java.io.IOException
-
-