nu.xom:Serializer
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的更多相关文章
- nu.xom:Document
Document: 机翻 Document(Document doc):创建此文档的副本. Document(Element root):使用指定的根元素创建新的Document对象. DocType ...
- nu.xom:Element
Element: 机翻 Element(Element element) :通过深复制,创建一个element Element(String name) :创建一个没有命名空间的element Ele ...
- nu.xom:Attribute
Attribute: 机翻 Attribute copy():生成一份当前Attribute的拷贝,但是它没有依附任何Element Node getChild(int position) :因为At ...
- json转xml报[java.lang.NoClassDefFoundError: nu/xom/Serializer]
原文:http://blog.csdn.net/figo645/article/details/48413571 开始学习JSON了,那么很自然的,我开始要熟悉一些基本的JSON语法 {}代表对象,[ ...
- XML2JSON 的【net.sf.json.JSONException: nu.xom.ParsingException must be followed by either attribute specifications, ">" or "/>"】问题解决办法
在使用JSon-Lib库进行XML2JSon的转换时,在JUnit测试时没有什么问题,但是在Tomcat里面跑的时候,抛出了下面的异常,查找了google,发现关于这方便的文章比较少,即使有,也需要F ...
- drf之序列化组件(一):Serializer
序列化组件:Serializer.ModelSerializer.ListModelSerializer Serializer 偏底层 ModelSerializer 重点 List ...
- tomcat启动报错:serializer.jar (系统找不到指定的文件。)
下载最新对应版本的tomcat.移除之前的tomcat.删除原本全部tomcat的目录. 疑似tomcat的lib包被动过.
- 转载:JSONObject简介
转载网址:http://www.cnblogs.com/java-pan/archive/2012/04/07/JSONObject.html JSONObject简介 本节摘要:之前对JSON做 ...
- 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:// ...
随机推荐
- C#高性能大容量SOCKET并发(七):协议字符集
原文:C#高性能大容量SOCKET并发(七):协议字符集 UTF-8 UTF-8是UNICODE的一种变长字符编码又称万国码,由Ken Thompson于1992年创建.现在已经标准化为RFC 362 ...
- 龙芯GO!龙芯平台上构建Go语言环境指南
龙芯软件生态系列——龙芯GO!龙芯平台上构建Go语言环境指南2016-07-05 龙芯中科1初识Go语言Go语言是Google公司于2009年正式推出的一款开源的编程语言,是由Robert Gries ...
- 解决com.android.dex.DexException: Multiple dex files define Lcom/google/gson/JsonSerializer;
我在开发Windows Azure的Mobile Service(隔天补上创建过程)的安卓客户端时,报出了com.android.dex.DexException: Multiple dex file ...
- Delphi url 编码及转码及特殊字符串替换--百度和腾讯用的就是这个
先介绍一下,Delphi中处理Google的URL编码解码,其中就会明白URL编码转换的方法的 从delphi的角度看Google(谷歌)URL编码解码方式 在网上搜索了一下,似乎没有什么关于goog ...
- Qt 中C++ static_cast 和 reinterpret_cast的区别(static_cast是隐式类型转换,会有数据损失,reinterpret_cast是底层二进制转换,没有数据损失)
1.C++中的static_cast执行非多态的转换,用于代替C中通常的转换操作.因此,被做为隐式类型转换使用.比如: int i; float f = 166.7f; i = static_cast ...
- 【canvas】基础练习三 图片
[canvas]Demo1 drawImage drawImage(img,x,y); <!DOCTYPE html> <html lang="en"> & ...
- Ruby元编程:单元测试框架如何找到测试用例
前几天看了Google Testing Blog上的一篇文章讲到C++因为没有反射机制,所以如何注册测试用例就成了一件需要各显神通的事情.从我的经验来看,无论是Google的GTest还是微软的LTM ...
- 你真的懂printf么?
自从你进入程序员的世界,就开始照着书本编写着各种helloworld,大笔一挥: printf("Hello World!\n"); 于是控制台神奇地出现了一行字符串,计算机一句温 ...
- Laravel5.x的php artisan migrate数据库迁移创建操作报错SQLSTATE[42000]解决
Laravel5.x运行迁移命令创建数据表:php artisan migrate报错. Illuminate\Database\QueryException : SQLSTATE[42000]: ...
- Fabric1.4源码解析:客户端创建通道过程
在使用Fabric创建通道的时候,通常我们执行一条命令完成,这篇文章就解析一下执行这条命令后Fabric源码中执行的流程. peer channel create -o orderer.example ...