JDOM API使用
包结构说明
org.jdom | Classes to represent the components of an XML document.用于表示xml文件中组件的类,比如Attribute,CDATA,Comment,Document,Element,Namespace等等 |
org.jdom.adapters | Classes to interface with various DOM implementations.DOM实现转接器。JAXPDOMAdapter是经常使用到的。 |
org.jdom.filter | Classes to programmatically filter nodes of a document based on type, name, value, or other aspects and to boolean and/or/negate these rules.过滤器 |
org.jdom.input | Classes to build JDOM documents from various sources.用于将不同的源变成JDOM文件,比如DomBuilder,SAXBuilder |
org.jdom.output | Classes to output JDOM documents to various destinations.用于将JDOM文件变成其他的文件,比如DomOutputter,SAXOutputter |
org.jdom.transform | Classes to help with transformations, based on the JAXP TrAX classes.基于JAXP TrAX类用于帮助transformation的类
|
org.jdom.xpath | Support for XPath from within JDOM.支持XPath的类 |
类和方法说明
1.org.jdom.Document
Document() Creates a new empty document.新建空的文档。 |
Document(Element rootElement) This will create a new Document , with the supplied Element as the root element, and no DocType declaration.使用Element作为根结点新建文档。 |
Document(Element rootElement, DocType docType) This will create a new Document , with the supplied Element as the root element and the supplied DocType declaration.使用Element作为根结点文件,并加入DocType的声明。 |
Document(Element rootElement, DocType docType, java.lang.String baseURI) This will create a new Document , with the supplied Element as the root element, the supplied DocType declaration, and the specified base URI.使用Element作为根结点文件,并加入DocType的声明,同时指定base URI。
|
Document(java.util.List content) This will create a new Document , with the supplied list of content, and a DocType declaration only if the content contains a DocType instance.使用content构建新文件 |
2.org.jdom.Element
protected | Element() This protected constructor is provided in order to support an Element subclass that wants full control over variable initialization. |
| Element(java.lang.String name) Create a new element with the supplied (local) name and no namespace. |
| Element(java.lang.String name, Namespace namespace) Creates a new element with the supplied (local) name and namespace. |
| Element(java.lang.String name, java.lang.String uri) Creates a new element with the supplied (local) name and a namespace given by a URI. |
| Element(java.lang.String name, java.lang.String prefix, java.lang.String uri) Creates a new element with the supplied (local) name and a namespace given by the supplied prefix and URI combination. |
posted on 2007-08-22 10:40
蛮哥♂枫 阅读(2140)
评论(0) 编辑 收藏 所属分类:
Java