Serializer:

机翻

/*
    使用用于控制空格,规范化,缩进,换行和基本URI的各种选项以特定编码输出Document对象
*/

Serializer(OutputStream out)                 :创建一个使用UTF-8编码的新序列化程序。
Serializer(OutputStream out, String encoding):创建一个使用指定编码的新序列化程序。

protected void breakLine():将当前换行符串写入基础输出流并按当前级别和缩进属性指定的缩进。

void flush()

protected int getColumnNumber():返回输出流的当前列号。
String getEncoding()           :返回此序列化程序使用的字符编码的名称。
int getIndent()                :返回此序列化程序缩进的空格数。
String getLineSeparator()      :返回用作行分隔符的字符串
int getMaxLength()             :返回首选的最大行长度。

void setIndent(int indent)
void setLineSeparator(String lineSeparator)
void setMaxLength(int maxLength)

boolean getPreserveBaseURI()             :如果此序列化程序通过插入额外的xml:base属性来保留原始基URI,则返回true。
boolean    getUnicodeNormalizationFormC():指示序列化是否将使用规范化形式C(NFC)对所有数据执行Unicode规范化。
void setPreserveBaseURI(boolean preserve)
void setUnicodeNormalizationFormC(boolean normalize)

void setOutputStream(OutputStream out):刷新上一个输出流并将进一步的输出重定向到新的输出流。

protected void write(Attribute attribute)  :以name =“value”的形式写入属性
protected void write(Comment comment)      :使用当前选项将注释写入输出流
protected void    write(DocType doctype)   :使用当前选项将DocType对象写入输出流
void write(Document doc)                   :使用当前选项将文档序列化到输出流。
protected void    write(Element element)   :使用当前选项将元素序列化到输出流
protected void    write(Text text)         :使用当前选项将Text对象写入输出流。
protected void    writeChild(Node node)    :使用当前选项将子节点写入输出流。

protected void    write(ProcessingInstruction instruction)    :使用当前选项将处理指令写入输出流。
protected void    writeAttributes(Element element)            :将指定元素的所有属性一次一个地写入输出流,由空格分隔。
protected void    writeEmptyElementTag(Element element)       :为元素写入一个空元素标记,包括其所有名称空间声明和属性。
protected void    writeEndTag(Element element)                :为</ name>形式的元素写入结束标记。
protected void    writeNamespaceDeclarations(Element element) :将指定元素的所有名称空间声明属性写入输出流,一次一个,用空格分隔。

protected void    writeAttributeValue(String value) :将字符串写入基础输出流。
protected void    writeEscaped(String text)         :将字符串写入基础输出流。

protected void    writeNamespaceDeclaration(String prefix, String uri):以xmlns:prefix =“uri”或xmlns =“uri”的形式写入名称空间声明。

protected void    writeXMLDeclaration()         :将XML声明写入输出流,然后换行。
protected void    writeRaw(String text)         :将字符串写入基础输出流。
protected void    writeStartTag(Element element):为元素写入start-tag,包括其所有名称空间声明和属性。

最新文章

  1. 如何在C#中获得input文本框中的值
  2. IOS开发UI基础文本属性Attributes
  3. TEXT、TINYTEXT、MEDIUMTEXT、LONGTEXT选择 和 char varchar varchar2 的区别
  4. Ubuntu对FireFox安装flash插件
  5. 解决statusStrip控件上的项目不能靠右对齐的问题
  6. lucene 4.0学习
  7. C#中byte[]与string的转换
  8. 《JavaScript 闯关记》之基本包装类型
  9. javascript有用小技巧—实现分栏显示
  10. svn冲突文件解决方法
  11. 使用vue全家桶制作博客网站
  12. css定位的各属性占位问题
  13. 20175307《Java程序设计》第8周学习总结
  14. 解决mysql插入数据报错[Err] 1146 - Table &#39;performance_schema.session_status&#39; doesn&#39;t exist
  15. 配置dataimport时候 如果css样式有问题 要修改index和admin的版本号
  16. FPGA系列之一:Cyclone V中的时钟资源
  17. springJDBC和SpringJDBCTemplate解决方案探究
  18. Windows7系统中怎么Ping端口?利用telnet命令Ping 端口的方法
  19. HTML5练习3
  20. 安装loadrunner

热门文章

  1. Silverlight DataGrid自适应数据
  2. 微信小程序把玩(三十九)navigation API
  3. 修复VirtualBox &quot;This kernel requires the following features not present on the CPU: pae Unable to boot – please use a kernel appropriate for your CPU&quot;(安装深度Linux的时候就需要)
  4. c# 获取cook
  5. QTableView中加入Check列实现,无需Delegate(使用::data(),Qt原生支持)
  6. centos 部署 asp.net core Error -99 EADDRNOTAVAIL address not available解决
  7. HTML 关于colgroup的研究
  8. 3016C语言_函数
  9. Yolov3代码分析与训练自己数据集
  10. kolla-ansible-----快速部署openstack