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:// ...
随机推荐
- EasyUI之combogrid
html代码: <div class="item-label">@Html.L("Name"):</div> <input id= ...
- QT5 屏幕旋转90度
主要思路是将所有项目界面加载到QGraphicsScene,再进行旋转操作.直接上代码#include <QApplication>#include <QGraphicsView&g ...
- 监控打印机(使用OpenPrinter,WaitForPrinterChange API函数)
uses Winapi.WinSpool; procedure TForm1.Button1Click(Sender: TObject);varpi2: PRINTER_INFO_2;hPrinter ...
- Qt元类型(MetaType)注册入门(附一些官方文档的关键摘录)
昨天调试项目时,突然发现如下消息: QObject::connect: Cannot queue arguments of type 'ERROR_LEVEL' (Make sure 'ERROR_L ...
- 解除.NET中虚拟路径的疑惑
今天部署产品时,发现一个涉及到路径错误的bug,在开发环境下都OK,但是到了测试环境中却一直报错,经过一番排查,原来错误出在了HttpContext.Current.Server.MapPath这个方 ...
- flask相关使用
一.手动创建一个干净的含有蓝图的flask项目目录 在init.py中 from flask import Flaskmy_app=Flask(__name__)def create_app() ...
- C语言实现常用数据结构——链表
#include<stdio.h> #include<stdlib.h> typedef struct Node { int data; struct Node *next; ...
- Python处理图片
# -*- coding: UTF-8 -*- from PIL import Image import os import sys reload(sys) sys.setdefaultencodin ...
- 升级vue全家桶过程记录
背景 如果你使用了element-ui的el-tabs组件,并且想要单独升级element-ui至2.10.0,你会发现,使用了el-tabs组件的页面只要打开就卡死.原因是element-ui~2. ...
- What?Tomcat-竟然也算中间件?
关于 MyCat 的铺垫文章已经写了两篇了: MySQL 只能做小项目?松哥要说几句公道话! 北冥有 Data,其名为鲲,鲲之大,一个 MySQL 放不下! 今天是最后一次铺垫,后面就可以迎接大 Bo ...