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,包括其所有名称空间声明和属性。

nu.xom:Serializer的更多相关文章

  1. nu.xom:Document

    Document: 机翻 Document(Document doc):创建此文档的副本. Document(Element root):使用指定的根元素创建新的Document对象. DocType ...

  2. nu.xom:Element

    Element: 机翻 Element(Element element) :通过深复制,创建一个element Element(String name) :创建一个没有命名空间的element Ele ...

  3. nu.xom:Attribute

    Attribute: 机翻 Attribute copy():生成一份当前Attribute的拷贝,但是它没有依附任何Element Node getChild(int position) :因为At ...

  4. json转xml报[java.lang.NoClassDefFoundError: nu/xom/Serializer]

    原文:http://blog.csdn.net/figo645/article/details/48413571 开始学习JSON了,那么很自然的,我开始要熟悉一些基本的JSON语法 {}代表对象,[ ...

  5. XML2JSON 的【net.sf.json.JSONException: nu.xom.ParsingException must be followed by either attribute specifications, ">" or "/>"】问题解决办法

    在使用JSon-Lib库进行XML2JSon的转换时,在JUnit测试时没有什么问题,但是在Tomcat里面跑的时候,抛出了下面的异常,查找了google,发现关于这方便的文章比较少,即使有,也需要F ...

  6. drf之序列化组件(一):Serializer

    序列化组件:Serializer.ModelSerializer.ListModelSerializer Serializer  偏底层  ModelSerializer       重点  List ...

  7. tomcat启动报错:serializer.jar (系统找不到指定的文件。)

    下载最新对应版本的tomcat.移除之前的tomcat.删除原本全部tomcat的目录. 疑似tomcat的lib包被动过.

  8. 转载:JSONObject简介

    转载网址:http://www.cnblogs.com/java-pan/archive/2012/04/07/JSONObject.html JSONObject简介   本节摘要:之前对JSON做 ...

  9. json:JSONObject包的具体使用(JSONObject-lib包是一个beans,collections,maps,java arrays和xml和JSON互相转换的包)

    1.JSONObject介绍 JSONObject-lib包是一个beans,collections,maps,java arrays和xml和JSON互相转换的包. 2.下载jar包 http:// ...

随机推荐

  1. SQL Server修改标识列方法(备忘)

    原文:SQL Server修改标识列方法(备忘) SQL Server修改标识列方法 ----允许对系统表进行更新 exec sp_configure 'allow updates',1 reconf ...

  2. DevExpress的xtraMessageBox汉化

    原文:DevExpress的xtraMessageBox汉化 项目使用的界面库是DevExpress 相当好用,不过里面弹出对话框XtraMessageBox的按钮都是英文的, 可能会对用户造成困扰, ...

  3. Have You Tried Delphi on Amazon Linux? (就是AWS用的Linux)

    The new Delphi Linux compiler enables customers to take new or existing Windows server applications ...

  4. Android零碎知识之Style and Theme

    Android的styles资源文件中存在了我们在应用中定义的各种style,它们都是以style开始的元素,包含许多属性的集合.但我们一般般它们分为style和theme,那它们有什么区别呢? 一. ...

  5. Java8 的一些新特性总结

    目前Java8已经发布很多个版本了,对于Java8中的新特性虽然有各位大神进行jdk8的英文特性文档翻译,但都太官方化语言,对照几篇翻译本人对新特性文档做一下总结,以帮助我和各位不了解Java8新特性 ...

  6. Android零基础入门第69节:ViewPager快速实现引导页

    在很多APP第一次启动时都会出现引导页,在一些APP里面还会包括一些左右滑动翻页和页面轮播切换的情况.在之前也已经学习了AdapterViewFlipper和ViewFlipper,都可以很好的实现, ...

  7. qt+opencv对两幅图片进行融合

    本文博客链接:http://blog.csdn.net/jdh99,作者:jdh,转载请注明. 源代码: #include "widget.h" #include "ui ...

  8. 玩转Java多线程(Lock.Condition的正确使用姿势)

    转载请标明博客的地址 本人博客和github账号,如果对你有帮助请在本人github项目AioSocket上点个star,激励作者对社区贡献 个人博客:https://www.cnblogs.com/ ...

  9. pomelo使用中的常见问题

    1.端口被占用, 有进程没杀干净. 用 pomelo kill --force 命令清一下进程.

  10. IIS 站点和应用池命令启动和停止

    在CMD下执行如下命令: IIS站点: 停止站点: C:\Windows\System32\inetsrv\appcmd.exe stop site “XXXX” 启动站点: C:\Windows\S ...