|
From: Nasseam E. <na...@ho...> - 2002-05-12 23:36:16
|
I am new to the list and noticed some threads regarding JDOM in the archives. You might have already finished the discussion and I'm pretty late but I have a few points to make about performance issues. JDOM relies on a SAX or DOM parser to build the JDOM representation. Most parsers use SAX to build a DOM tree so you are actually converting from SAX to DOM without even knowing it. You can create a JDOM Document using either SAX or DOM. From SAX to JDOM is a direct process. However, from DOM to JDOM is not as direct because you are using SAX to build the DOM tree and then to build the JDOM Document. Since all the Xbeans are using DOM interfaces, going from DOM to JDOM will cost you some performance. I just started reading about Xbeans so I don't know much but maybe you guys can clarify this for me. Maybe you should have a separate interface that only supports JDOM, uses SAX to build the representation, and excludes DOM entirely. Then you can throw in a JDOM to DOM and DOM to JDOM converter for interoperability between Xbeans that use different interfaces. I don't know if you want to go with all that trouble to make to separate interfaces but from what I have noticed, using event-driven APIs such as SAX is the most efficient way to build XML representations. Also, I would appreciate if anyone has any sample source for using JDOM with Xbeans. I noticed a few threads offering the source code for such projects. You can send it to na...@ho.... Thanks, Nasseam Elkarra |