Hey, wait, what about org.w3c.dom.Node class? :roll: Where did you find it? Just curious.
Generally, the more I read posts in this forum, the more I tend to agree with Michael Ernest's reactionary position, that XML brings more problems than it solves. XML was intended as a
simple tool to solve our problems. Now it becomes the major violator of KISS (Keep It Small and Simple) principle.
Look at this program from JDJ that uses 1 (one) RegEx to parse the tag structure similar to XML tree:
http://www.sys-con.com/java/archivesa.cfm?volume=07&issue=01 Using Regular Expressions in J2SE 1.4 Source Code
Essentially, the program is one expression: <(.*)>(.*)</\\1> This is about as complex as it should be.
Now compare it to how XML parsing is done in
Java: sophisticated, object-oriented, interface based, multi-layered architecture where one layer of indirectness is placed above another and all one can get out of this monster are exceptions (
example1 example2), promptly delivered from one of middle layers.
I ready to agree that if your job is to XMLize a giant company, then this complexity is justified, otherwise... :roll:
What do you think?
[ April 25, 2002: Message edited by: Mapraputa Is ]