[jdom-interest] Which is fastest!!!! Your Opinion needed!!!!

Ken Rune Helland kenh at csc.no
Thu Apr 11 01:39:24 PDT 2002


> Hi Friends,
>  
> I am already using Jdom for a couple of use cases in my project. I have
> this new use case (functionality) where I am debating whether to use
> SAX DOM or JDOM. Please advice!!!!!
>  
> I have this datastream from a source which contains about 50 elements
> in xml format. It is kinda like <root>
>   <element1>abc</element1>
>   <element2>xyz</element2>
>   <element3>xyz</element3>
> .
> .
> .
>  
>  
> </root>
>  
> Now I want to parse through this XML and store it into a datastructure
> like an hashtable and then store it into a table. I need each of these
> elements, so I am going to basically parse through the whole String and
> need all the elements.
>  
> Which parser would be the best????
>  
> I guess I like Jdom more than Dom since it is java, so it is between
> SAX and JDOM, which would be faster??

SAX woud definitevly be faster as JDOM uses a SAX-pasrser to build the 
JDOM document tree.

Whitch woud be better? That depends on you requirements: execution speed, 
developent time, code readability/maintainability and so fort.


KenR





 


-- 
e-mail : kenh at csc.no
Tlf    : +47 22 95 86 45
Tlf Mob: +47 91 87 27 38





More information about the jdom-interest mailing list