Hi Martin,
Actually i have nested elements which sometimes go upto 4 levels of nesting. Is it still advisable to go in for SAX or
is it definitely DOM in this case ?
Thanks,
Chetan Arora
Martin Gülich <[EMAIL PROTECTED]>
08/27/2004 12:43 PM
|
|
Hi!
Use DOM parsing! But if you have a large file it might be inefficient, then SAX parsing is better. If you only want to handle ONE entire element at a time you can build your own tree structure for that element only by using a stack or something similar. Then discard the tree and build a new for the next element etc.
Martin Gülich
Research Engineer
______________________________
Swedish Defence Research Agency
Dept. Of Systems Modelling
SE-172 90 Stockholm, Sweden
Phone: +46 8 55503691
Company web site: www.foi.se
-----Ursprungligt meddelande-----
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Skickat: den 27 augusti 2004 06:49
Till: [EMAIL PROTECTED]
Ämne: Reading entire tree structure of an XML
Hi,
My XML has atleast 5 levels of nested elements. How can i read the entire data and put
it in a Container so that i can use that data for processing ?
Thanks and Regards,
Chetan
ForwardSourceID:NT00002892
DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services Limited. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services Limited on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services Limited takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services Limited shall be understood as neither given nor endorsed by Tata Consultancy Services Limited or any affiliate of Tata Consultancy Services Limited. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]