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 XmlDocumentpublic void setXmlDeclaration(XmlNode xmlDeclaration)
setXmlDeclaration in interface XmlDocumentxmlDeclaration - public List<XmlNode> getCommentList()
getCommentList in interface XmlDocumentpublic List<XmlNode> getDoctypeList()
getDoctypeList in interface XmlDocumentpublic List<XmlNode> getProcessingInstructionList()
getProcessingInstructionList in interface XmlDocumentpublic void addDoctype(XmlNode node)
addDoctype in interface XmlDocumentCDATA文本 - public void addProcessingInstruction(XmlNode node)
addProcessingInstruction in interface XmlDocumentprocessingInstruction - public void addComment(XmlNode node)
addComment in interface XmlDocumentcomment - public void write(OutputStream out) throws IOException
write in interface Document<XmlNode>out - IOExceptionCopyright © 2006–2018 TinyGroup. All rights reserved.