public class XmlDocumentImpl extends Object implements XmlDocument
Constructor and Description |
---|
XmlDocumentImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addComment(XmlNode node)
添加注释
|
void |
addDoctype(XmlNode node)
添加CDATA文本
|
void |
addProcessingInstruction(XmlNode node)
添加XML处理指令
|
List<XmlNode> |
getCommentList()
获取Xml注释
|
List<XmlNode> |
getDoctypeList()
获取CDATA部分
|
List<XmlNode> |
getProcessingInstructionList()
获取XML处理指令
|
XmlNode |
getRoot()
获取根结点 s
|
XmlNode |
getXmlDeclaration()
获取XML声明
|
void |
setRoot(XmlNode root)
设置根结点
|
void |
setXmlDeclaration(XmlNode xmlDeclaration)
设置XML声明
|
String |
toString()
获取完整XML文档
|
void |
write(OutputStream out)
将XML文档写入指定的输出流中
|
public XmlNode getRoot()
public void setRoot(XmlNode root)
public XmlNode getXmlDeclaration()
getXmlDeclaration
in interface XmlDocument
public void setXmlDeclaration(XmlNode xmlDeclaration)
setXmlDeclaration
in interface XmlDocument
xmlDeclaration
- public List<XmlNode> getCommentList()
getCommentList
in interface XmlDocument
public List<XmlNode> getDoctypeList()
getDoctypeList
in interface XmlDocument
public List<XmlNode> getProcessingInstructionList()
getProcessingInstructionList
in interface XmlDocument
public void addDoctype(XmlNode node)
addDoctype
in interface XmlDocument
CDATA文本
- public void addProcessingInstruction(XmlNode node)
addProcessingInstruction
in interface XmlDocument
processingInstruction
- public void addComment(XmlNode node)
addComment
in interface XmlDocument
comment
- public void write(OutputStream out) throws IOException
write
in interface Document<XmlNode>
out
- IOException
Copyright © 2006–2018 TinyGroup. All rights reserved.