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 介绍 ...
随机推荐
- C#基础加强篇----委托、Lamada表达式和事件(上)
1.委托 C#的委托相当于C/C++中的函数指针.函数指针用指针获取一个函数的入口地址,实现对函数的操作. 委托与C/C++中的函数指针不同在于,委托是面向对象的,是引用类型,对委托的使用要先定义后实 ...
- WinForm TreeView单击,但是获取的是上一次点击选中的节点
/// <summary> /// MouseDown是鼠标按下事件发生在你鼠标单击事件之前,你单击鼠标发生了两个动作,一是鼠标按下二是鼠标抬起.执行之后,就会把SelectedNode转 ...
- ArcGIS for Desktop入门教程_第八章_Desktop学习资源 - ArcGIS知乎-新一代ArcGIS问答社区
原文:ArcGIS for Desktop入门教程_第八章_Desktop学习资源 - ArcGIS知乎-新一代ArcGIS问答社区 1 学习资源 用户在学习和应用过程中,可以参考的资源如下: 1. ...
- WPF用DirectSound播放声音
示例代码: var fileName = @"D:\WindowsLogon.wav"; DevicesCollection sound_devices = new Devices ...
- UWP项目生成安装包远程安装在树莓派上
原文: UWP项目生成安装包远程安装在树莓派上 哎,好纠结啊!如果这个名字写的太长,会显得太繁琐,如果写的短又好像说不清楚,我这语言表达水平实在是令人担忧啊!不过应该能够明白啥意思吧!因为对这个感兴趣 ...
- 用代码关闭冰刃(IceSword)
(*冰刃这个系统分析工具以前还没用过.这样高级的工具,用结束进程的方式就不试了.按手工关闭的流程实现.首先是通过遍历当前进程,确定冰刃进程的主窗体:然后发送WM_CLOSE关闭主窗体.当关闭对话框出现 ...
- Windows线程生灭(图文并茂)
一.线程创建 Windows线程在创建时会首先创建一个线程内核对象,它是一个较小的数据结构,操作系统通过它来管理线程.新线程可以访问进程内核对象的所有句柄.进程中的所有内存及同一进程中其它线程的栈. ...
- Hadoop集群(第4期)VSFTP安装配置
1.VSFTP简介 VSFTP是一个基于GPL发布的类Unix系统上使用的FTP服务器软件,它的全称是Very Secure FTP 从此名称可以看出来,编制者的初衷是代码的安全. 安全性是编写VSF ...
- java多线程之多生产者-多消费者
多生产者和多消费者是线程通信的经典案例,但是和生产者-消费者相比更为复杂,而且可能会产生程序假死. public class Product { private MyStack myStack; pu ...
- Laravel --- 要点笔记
一.路由: // 常规用法 Route::get('/',function(){ return 'get'; }) // 匹配多个 Route::match(['get','post'],'/',fu ...