Re: XMl and Hashtable question
"Altug B. Altintas" <[email protected]> Fri, 8 Nov 2002 15:31:36 +0200
| Newsgroups | gmane.comp.java.sun.xml.general |
|---|---|
| Message-ID | <001c01c2872b$2922b880$411410ac@aaltintas> |
Use JAXB -----Original Message----- From: XML technologies in the Java Platform [mailto:[email protected]] On Behalf Of Simha, Shuba Sent: Friday, November 08, 2002 3:16 PM To: [email protected] Subject: XMl and Hashtable question Hi everyone, Quick question: My rather huge xml file, has the following format: <tag1 ..> <tag2 ..> <tag3 ..> <tag4 ..> <tag4 ..> .... </tag3> </tag2> </tag1> From this file, I need to get all the info about tag1 (all the tag2, tag3, tag4 for tag1). I have 2 ideas: Parse once and hold "tag1:tag2:tag3:tag4" as the key in a Hashtable, or parse everytime. My question: Which is more expensive - parsing this XML file using JDOM parser each time or reading from the Hashtable and splitting the key based on ":" to get info for tag1? Thanks for your time. -shuba ------------------------------------------------------------------------ ------ Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it. ======================================================================== ====== ----------------------------------------------------- xml-interest: A list for discussing XML technologies in the Java Platform. To post, mailto:[email protected] Archives at: http://archives.java.sun.com/xml-interest.html To unsubscribe, mailto:[email protected] the following message; signoff xml-interest. ----------------------------------------------------- xml-interest: A list for discussing XML technologies in the Java Platform. To post, mailto:[email protected] Archives at: http://archives.java.sun.com/xml-interest.html To unsubscribe, mailto:[email protected] the following message; signoff xml-interest.