Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

Java and XML, SAX or JDOM or XOM?!

Thread view: 
steve_marjoribanks@hotmail.com - 13 Jan 2006 16:05 GMT
I am writing a Java application which will view XML data and display it
graphically (within an engineering context) and also as an aside will
allow you to view the XML 'tree' structure. Obviously this will require
a fair amount of XML manipulation and so I was wondering what people
thought the most suitable API to use would be?
>From what I can gather SAX or DOM and maybe JDOM are the most commonly
used, but the book I am currently reading regards XOM (www.xom.nu) very
highly as it is very strict in terms of only allowing valid XML etc.
and also is supposed to have a very shallow learning curve. Bearing in
mind I am a Java beginner, what do people think of the options?

Many thanks,
Steve
Michael Redlich - 13 Jan 2006 16:57 GMT
> I am writing a Java application which will view XML data and display it
> graphically (within an engineering context) and also as an aside will
[quoted text clipped - 9 lines]
> Many thanks,
> Steve

Hi Steve:

There's a XML parsing utility called XMLtp that you can use.  It was
originally developed in 1999 (before Java provided XML support) by
Thomas Weidenfeller, but it's still useful in terms of
checking/enforcing valid XML syntax.  One of the examples is a GUI
application to display the tree structure that you need.  Check out
http://mitglied.lycos.de/xmltp/ for more information and to download
the parser.

Sincerely,

Mike.

--- ACGNJ Java Users Group (http://www.javasig.org/)
steve_marjoribanks@hotmail.com - 13 Jan 2006 17:16 GMT
Thanks for the information, I shall look into it but I'm not sure it's
exactly what I need (then again, what do I know!!?). Maybe I should
have better explained what the application will be.
Firstly I am thinking up a new standardized XML data structure for use
within a certain domain. I am then going to write two applications
which will use this data format.

The first one will be able to load a previously written XML data file
and display the data (related to slope stability) graphically (ie. a
pictorial representation).
The second one will be a sort of XPath/XPointer interactive visualiser
so the user will be able to see and explore the complicated XLinks
between various sections of the data.

Therefore, I think the API I use will need to be able to validate the
XML data against a schema file (not a DTD), be able to handle XPath as
well as all the 'normal' stuff.

Regards
Steve
Michael Redlich - 14 Jan 2006 00:01 GMT
Hi Steve:

Thanks for the updated information...

> The first one will be able to load a previously written XML data file
> and display the data (related to slope stability) graphically (ie. a
> pictorial representation).

XMLtp would have been perfect for the first task....

> The second one will be a sort of XPath/XPointer interactive visualiser
> so the user will be able to see and explore the complicated XLinks
> between various sections of the data.

However, not for the second...

> Therefore, I think the API I use will need to be able to validate the
> XML data against a schema file (not a DTD), be able to handle XPath as
> well as all the 'normal' stuff.

Therefore, I would suggest using the Java API for XML Processing (JAXP)
1.3 which is included in J2SE 5.0.  More details can be found at
http://java.sun.com/webservices/jaxp/index.jsp.

As I mentioned earlier, XMLtp was written before JAXP was developed.
The author, Thomas Weidenfeller, even stopped supporting XMLtp in 2001.
However, I think that it can still be useful as a learning tool and
for use in small applications that need to parse data stored in XML
format.

Sincerely,

Mike.

--- ACGNJ Java Users Group (http://www.javasig.org/)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.