Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference Jdom and Jaxp

 
Awais Bajwa
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I want to know the difference between Jdom and Jaxp
anybody else can have comments .
Awais Bajwa
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JAXP is an XML framework by SUN that allows programmers to plug-in any W3C compliant XML parser using Java's system property files. It is not a parser by itself, but provides a level of abstraction by facilitating dynamic parser selection. From an architectural perspective JAXP sits between the actual XML parser and your application.
JDOM is another XML framework that integrates standard Java collection classes with any W3C compliant DOM parser allowing programmers to manipulate DOM objects as Java Collections. Very much like JAXP, JDOM sits between the application and the parser. Note that JDOM by itself is not an XML parser.
Hope that helps!
------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.
 
Awais Bajwa
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ajith ,
I am very much clear now ,but what is ment by w3c compliant
using java's system property files(Jaxp).
One more thing is that as u r saying that
Jdom is not a java parser than using which api
it parses xml files .
Regards .
Awais Bajwa.
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any parser that behaves according to W3C DOM specs is said to be W3C compliant.
 
Awais Bajwa
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ajith Kallambella:
Any parser that behaves according to W3C DOM specs is said to be W3C compliant.

thanks.

 
Ramesh Donnipadu
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May I also add that JDOM
1. attempts to replace SAX and DOM
2. Follows tree structure and is very much like DOM
3. Java only solution to parsing
4. Has a higher performance than DOM
and JAXP
1. Provides an abstraction layer over SAX or DOM
2. allows change of Parser implementation between SAX and DOM
-Ramesh
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ramesh,
May I ask what makes you say "JDOM attempts to replace SAX and DOM"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic