What is the relationship between JAXP with DOM4J?

xiaoxiao2021-03-05  21

JAXP is a specification proposed by Sun, which is used to define an interface to resolve and convert an XML document. The current version has reached 1.3, and the parser and converter can be diverse when the resolution converter is independent. This is a gospel for application development. But current JAXP is not as broad in domestic use, which is due to a certain market reasons (support for different versions of JVM).

Now more applications use DOM4J and JDOM, which is easier to operate.

Personally, DOM4J (less understanding of JDOM) is not a strict XML parser. The bottom layer is also implemented in accordance with the JAXP specification, and Dom4j's documentation indicates that can work with JAXP, using JAXP already config The parser and converter.

In the latest release version 1.5.2 of DOM4J, due to the issue of the license, the internal removal of the decisor Aelfred2 is removed, this should be more dependent on the underlying crimson.jar or Xerces.jar, and the two are in accordance with JAXP specifications. .

Specific knowledge is still in research.

Discussion on this with www.javagarden.net:

. -------------------------------------------------- -------------------. | Session Start: April 6, 2005 || Participants: || (SN) Dagu@msn.com | | .... On April 18, Einstein 50th Anniversary Day (IP) www.javagarden.net (turbochen@163.com) |. ----------------- -------------------------------------------------- -. [16:39:28] (SN) Da Fu: http://blog.9cbs.net/toafu/archive/2005/04/06/338337.aspx[16:39:34] (SN) large Afless: Do I understand? [16:41:57] Turbo, a bea: Good [16:42:52] (SN) Big Afu: But how can I find it directly to use the Dom4j, it is associated with JAXP. When there are two paths in the class path. [16:46:18] Turbo, a bea: JAXP is not a few factory, it is from this. [16:47:06] (SN) Big Afu: But I didn't see the Dom4j for these What is the implementation of Factory? [16:48:24] Turbo, a bea: I remember to see on an article, it seems to be in the form of Factory, incoming a Class, and what method is still going to check. [16 : 49: 08] (SN) Big Afu: Is it related to DOM4J? [16:49:41] Turbo, a bea: You should still remember how the JDBC driver is loaded, similar to that principle. [16:50:37] (SN) Da Fu: find a few paths in order Whether there is a loaded class [16:51:23] Turbo, a bea: is not, it is DriverManager.Forname ("classname"); similar to this. [16:51:32] (SN) Da Fu: [16:53:52] (SN) Big Afu: Is this understanding, Dom4j is not compliant with the JAXP specification, the same bottom is the XML parser that complies with the JAXP specification, just because DOM4 J provides easy Application is wide [16:55:49] Turbo, a bea: I think Dom4j compliance with JAXP specification, expand, make API more easily use. I didn't actually have used Dom4j, but I know it than JAXP DOM API It is much better. I have developed all the use of JAXP's DOM API. I took a element code very embarrassing. [16:56:40] Turbo, a bea: and JDom are not compliance with the JAXP specification [16: 56:52] Turbo, a bea: It is not easy to transplant. [16:57:14] (SN) Da Fu: Good.

What I want to know is that if the DOM4J and JAXP's API is under classpath, if you can implement the DOM4J for the direct operation of the JAXP interface? [17:00:08] Turbo, A bea: How does dom4j relate to DOM DOM is a quite large language independent API dom4j is a simpler, lightweight API which is optimised for the Java making extensive use of the Java 2 platform such?. As The Java 2 Collections. Thought Dom4j Fully Supports The Dom Standard Allowing Both Apis To Be Used Easily TOGETHER. [17:00:19] Turbo, a bea: The above is the content of DOM4J FAQ [17:00:57] Turbo, A Bea: Dom4j Fully Supports The Dom Standard Allowing Both Apis To Be Used Easily TOGETHER. [17:01:07] Turbo, A BEA: The most important thing is the top of this sentence [17:01:52] (SN) Da Fu : Don't understand what it means [17:02:28] (SN) Da Fu: BOTH means? [17:02:49] Turbo, a bea: It should refer to DOM4J and DOM [17:03:05] Turbo, a bea: Together proves this [17:03:10] (SN) Da Fu: Oh ? [17:04:53] Turbo, a bea: Look at this sentence: Dom4j Works with any sax paser via jaxp. [17:05:37] (SN) Big Afu: Oh, I want to know how it is Work With, or let's write DOM4J and JAXP [17:05:40] Turbo, a bea: This is the SAX Parser, which is in line with the JAXP specification, as long as it is in accordance with the SAX Parser of the JAXP specification. [17:07:00] (SN) Da Fu: You do this wrong [17:08:04] (SN) Da Fu: That is to say that DOM4J and JAXP are columns, just Dom4j is not a standard, Is it [17:08:58] Turbo, a bea: I think JAXP is a standard, and DOM4J is a standardized extension. [17:09:35] (SN) Daffe: and Xerces, etc. is a standardized implementation [17 : 09: 55] Turbo, a bea: Yes [17:10:21] (SN) Da Fu: is JAXP not directly supporting XPath, so it is better to use Dom4j [17:10:35] Turbo, A bea: In fact, JAXP initial implementation is donated by apache, [17:10:47] (SN) Big Afu: So XML parser is apache [17:10:59] Turbo, a bea: Undefined XPath, I don't know how Java5 is implemented. [17:11:10] Turbo, a bea: Yes [17:11:29] (SN) Da Fu: New 1.3 support java5, huh [17: 11:36] (SN) Da Fu: Good,

转载请注明原文地址:https://www.9cbs.com/read-39118.html

New Post(0)