File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes When to use ... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "When to use ..." Watch "When to use ..." New topic
Author

When to use ...

Vladan Radovanovic
Ranch Hand

Joined: Mar 20, 2000
Posts: 216
Hi everyone, I am wondering if anyone wants to expand on when to use.
a) DOM Vs SAX
b) Attribute Vs Element
c) CSS Vs XSL
d) DTD Vs Schema
Actually, first one has been discussed many times but does anyone wants to discuss other three. If you know a document that is discussing these in more detail, I would appreciate if you point me to it.
Thanks
Vladan
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
�DTD vs Schema� issue was raised before, and since I did not find any way to publish a table in this forum (with HTML tags off), I put a small table here: http://www.javaranch.com/xml/DTDvsSHEMA.htm
Today I copied two other tables from my preparation notes.
Attributes vs. Elements: http://www.javaranch.com/xml/ATTRvsELEM.htm
XSLT vs. CSS: http://www.javaranch.com/xml/XSLTvsCSS.htm
If somebody has something to add, please, tell it here!

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
Vlad Patryshev
Ranch Hand

Joined: Jun 30, 2001
Posts: 61
And I actually have a collateral questions: okay, why is any DTD can be necessary in real life? Does it help extract or verify data? Not much, if ever.


Thanks,<br />Vlad
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5781
Use of DTD ensures structural integrity of the XML document. When you receive XML files from external sources( which will eventually be the case when XML becomes the de-facto standard for data interchange ), your processing logic should not only validate the content, but also the structure.


Open Group Certified Master IT Architect.
Sun Certified Architect(SCEA).
 
 
subject: When to use ...
 
Threads others viewed
&& vs & , || vs |
pageContext vs request vs page
subclass vs compostion
XML vs. ???
\" vs '
developer file tools