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 HtmlDocument
public void setHtmlDeclaration(HtmlNode htmlDeclaration)
setHtmlDeclaration
in interface HtmlDocument
htmlDeclaration
- public List<HtmlNode> getCommentList()
getCommentList
in interface HtmlDocument
public List<HtmlNode> getDoctypeList()
getDoctypeList
in interface HtmlDocument
public List<HtmlNode> getProcessingInstructionList()
getProcessingInstructionList
in interface HtmlDocument
public void addDoctype(HtmlNode node)
addDoctype
in interface HtmlDocument
node
- public void addProcessingInstruction(HtmlNode node)
addProcessingInstruction
in interface HtmlDocument
node
- public void addComment(HtmlNode node)
addComment
in interface HtmlDocument
node
- public void write(OutputStream out) throws IOException
write
in interface Document<HtmlNode>
out
- IOException
Copyright © 2006–2018 TinyGroup. All rights reserved.