nu.xom:Element
Element:
机翻
Element(Element element) :通过深复制,创建一个element Element(String name) :创建一个没有命名空间的element Element(String name, String uri) :在指定的命名空间下创建一个element void addAttribute(Attribute attribute) :为当前的Element添加或替换属性(如果属性拥有同样的URI则替换) Attribute removeAttribute(Attribute attribute) :移除当前元素的Attribute void addNamespaceDeclaration(String prefix, String uri):添加一个命名空间的前缀 void removeNamespaceDeclaration(String prefix) :删除指定前缀的映射。 void appendChild(String text) :将一个字符串转换成text节点,并添加到当前节点下 void insertChild(String text, int position) :将字符串转换为文本节点,并将该节点插入指定位置。 Nodes removeChildren() :从此节点分离所有子节点 Attribute getAttribute(int index) :根据index得到一个属性 Attribute getAttribute(String name) :在no namespace中根据一个字符串得到一个Attribute,如果no namespace中不存在这个属性,则返回null Attribute getAttribute(String localName, String namespaceURI):在URI命名空间中,根据一个字符串得到一个Attribute,如果URI命名空间中不存在这个属性,则返回null String getAttributeValue(String name):返回no namespace中具有指定名称的属性的值,如果no namespace中没有具有该名称的属性,则返回null。 String getAttributeValue(String localName, String namespaceURI):返回URI namespace中具有指定名称的属性的值,如果URI namespace中没有具有该名称的属性,则返回null。 String getBaseURI() :返回应该解析此元素中的相对URI的绝对基URI。 int getAttributeCount() :返回此Element的属性数,不计算名称空间声明。 Elements getChildElements() :以文档顺序返回此元素的所有子元素的列表。 Elements getChildElements(String name) :返回此元素的子元素列表,其中指定名称为no spacename。 Elements getChildElements(String localName, String namespaceURI) :返回此元素的子元素列表,其中指定名称为URI spacename。 Element getFirstChildElement(String name) :返回此元素的第一个子元素,其中指定名称为no spacename。 Element getFirstChildElement(String localName, String namespaceURI):返回此元素的第一个子元素,其中指定名称为URI spacename。 String getLocalName() :返回此元素的本地名称,不包括名称空间前缀或冒号。 int getNamespaceDeclarationCount() :返回此元素上的名称空间声明的数量。 String getNamespacePrefix() :返回此元素的前缀,如果此元素没有前缀,则返回空字符串。 String getNamespacePrefix(int index) :返回在此元素上声明的indexth命名空间前缀。 String getNamespaceURI() :返回此元素的名称空间URI,如果此元素不在名称空间中,则返回空字符串 String getNamespaceURI(String prefix):返回映射到此元素中指定前缀的名称空间URI String getQualifiedName() :返回此元素的完整名称,包括此元素具有的名称空间前缀。 String getValue() :返回XPath .0定义的元素的值。 void setBaseURI(String URI) void setLocalName(String localName) void setNamespacePrefix(String prefix) void setNamespaceURI(String uri) Element copy() :对当前Element进行深度复制,复制后的Element没有双亲,可以添加到一个Document或者另一个Element下 protected Element shallowCopy():使用相同的名称和名称空间URI创建非常浅的元素副本,但不包含子项,属性,基URI或名称空间声明。 String toXML():返回当前Element XML序列化后的字符串
nu.xom:Element的更多相关文章
- nu.xom:Serializer
Serializer: 机翻 /* 使用用于控制空格,规范化,缩进,换行和基本URI的各种选项以特定编码输出Document对象 */ Serializer(OutputStream out) :创建 ...
- nu.xom:Document
Document: 机翻 Document(Document doc):创建此文档的副本. Document(Element root):使用指定的根元素创建新的Document对象. DocType ...
- nu.xom:Attribute
Attribute: 机翻 Attribute copy():生成一份当前Attribute的拷贝,但是它没有依附任何Element Node getChild(int position) :因为At ...
- XML2JSON 的【net.sf.json.JSONException: nu.xom.ParsingException must be followed by either attribute specifications, ">" or "/>"】问题解决办法
在使用JSon-Lib库进行XML2JSon的转换时,在JUnit测试时没有什么问题,但是在Tomcat里面跑的时候,抛出了下面的异常,查找了google,发现关于这方便的文章比较少,即使有,也需要F ...
- json转xml报[java.lang.NoClassDefFoundError: nu/xom/Serializer]
原文:http://blog.csdn.net/figo645/article/details/48413571 开始学习JSON了,那么很自然的,我开始要熟悉一些基本的JSON语法 {}代表对象,[ ...
- Mongodb:修改文档结构后出现错误:Element '***' does not match any field or property of class ***.
Mongodb:修改文档结构后出现错误:Element '***' does not match any field or property of class ***. Mongodb是一种面向文档的 ...
- selenium+python自动化88-批量操作循环点击报错:Element not found in the cache - perhaps the page has changed since it was looked up
前言 selenium定位一组元素,批量操作循环点击的时候会报错:Element not found in the cache - perhaps the page has changed since ...
- async-validator:Element表单验证
转载文章:Element表单验证(2) Element表单验证(2) 上篇讲的是async-validator的基本要素,那么,如何使用到Element中以及怎样优雅地使用,就在本篇. 上篇讲到a ...
- Vue 组件库:Element
目录 Element 介绍 什么是 Element ? Element 快速入门 Element 常用组件 基础布局 容器布局 表单组件 表格组件 顶部导航栏组件 侧边导航栏组件 Element 介绍 ...
随机推荐
- 将byte[]转为WriteableBitmap对象
原文:将byte[]转为WriteableBitmap对象 //convert the bytes to WriteableBitmap privateWriteableBitmap BytesToI ...
- 微信小程序把玩(二十四)toast组件
原文:微信小程序把玩(二十四)toast组件 toast消息提示框,可用在提示一些信息,比如清楚缓存给用户一个友好的提示!或操作一些请求不想让用户有什么操作,toast也可以做到因为toast显示时其 ...
- C#获取应用路径的一些方法
// 获取程序的基目录. System.AppDomain.CurrentDomain.BaseDirectory // 获取模块的完整路径. System.Diagnostics.Process.G ...
- 中国2017 Google 开发者大会第一天简单回顾
昨天有幸参加了中国2017 Google 开发者大会,在这第一天就收获满满,昨天太忙了,今天早晨来一起简单回顾一下,可以让没有参加的童鞋们感受一下现场的温度. 早早就来到了会议现场,外面看不出什么特别 ...
- 【原创】基于Docker的CaaS容器云平台架构设计及市场分析
基于Docker的CaaS容器云平台架构设计及市场分析 ---转载请注明出处,多谢!--- 1 项目背景---概述: “在移动互联网时代,企业需要寻找新的软件交付流程和IT架构,从而实现架构平台化,交 ...
- css的双飞翼布局
双飞翼布局的大概意思就是左右两边的内容是固定的,大小是固定的, 而中间的布局的随着页面的大小变化而自动变化的. 通过代码来解析: 1.四个div,也可以使用section,其中main,left.ri ...
- 淘宝开源Key/Value结构数据存储系统Tair技术剖析
摘要: Tair的功能 Tair是一个Key/Value结构数据的解决方案,它默认支持基于内存和文件的两种存储方式,分别和我们通常所说的缓存和持久化存储对应. Tair除了普通Key/Value系统提 ...
- Spring之ApplicationContext
(1)ApplicationContext接口容器 ApplicationContext用于加载Spring的配置文件,在程序中充当“容器”的角色.其实现类有两个.通过Ctrl +T查看: A.配置文 ...
- 十分钟了解Kubernetes
何为Kubernetes? 最简单的一句话来概括Kubernetes. 它就是一套成熟的商用服务编排解决方案.Kubernetes定位在Saas层,重点解决了微服务大规模部署时的服务编排问题. Kub ...
- MySQL如何转SQL server
MySql的数据如何导入到Sql Server数据库中?(转载) 本文咱讨论的重点是如何将MySql数据导入到Sql Server数据库中,所以就需要机器上同时安装了MySql和Sql Serve ...