public class HtmlDocumentImpl extends Object implements HtmlDocument
| Constructor and Description |
|---|
HtmlDocumentImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addComment(HtmlNode node)
添加注释
|
void |
addDoctype(HtmlNode node)
添加CDATA文本
|
void |
addProcessingInstruction(HtmlNode node)
添加HTML处理指令
|
List<HtmlNode> |
getCommentList()
获取Html注释
|
List<HtmlNode> |
getDoctypeList()
获取CDATA部分
|
HtmlNode |
getHtmlDeclaration()
获取HTML声明
|
List<HtmlNode> |
getProcessingInstructionList()
获取HTML处理指令
|
HtmlNode |
getRoot()
获取根结点 s
|
void |
setHtmlDeclaration(HtmlNode htmlDeclaration)
设置HTML声明
|
void |
setRoot(HtmlNode root)
设置根结点
|
String |
toString()
获取完整HTML文档
|
void |
write(OutputStream out)
将HTML文档写入指定的输出流中
|
public HtmlNode getRoot()
public void setRoot(HtmlNode root)
public HtmlNode getHtmlDeclaration()
getHtmlDeclaration in interface HtmlDocumentpublic void setHtmlDeclaration(HtmlNode htmlDeclaration)
setHtmlDeclaration in interface HtmlDocumenthtmlDeclaration - public List<HtmlNode> getCommentList()
getCommentList in interface HtmlDocumentpublic List<HtmlNode> getDoctypeList()
getDoctypeList in interface HtmlDocumentpublic List<HtmlNode> getProcessingInstructionList()
getProcessingInstructionList in interface HtmlDocumentpublic void addDoctype(HtmlNode node)
addDoctype in interface HtmlDocumentnode - public void addProcessingInstruction(HtmlNode node)
addProcessingInstruction in interface HtmlDocumentnode - public void addComment(HtmlNode node)
addComment in interface HtmlDocumentnode - public void write(OutputStream out) throws IOException
write in interface Document<HtmlNode>out - IOExceptionCopyright © 2006–2018 TinyGroup. All rights reserved.