Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Actually I'm implementing something and know one solution, but want to implement the

Reply
Thread Tools

Actually I'm implementing something and know one solution, but want to implement the

 
 
Shraddha Kapse Shraddha Kapse is offline
Junior Member
Join Date: May 2009
Posts: 1
 
      05-05-2009
I have to implement SAX parsing on one xml. In SAX parsing, parser reads XML line by line. So it can look ahead. Now here is my XML structure(Note: Capital letters represent "ELEMENT" and small letters represent some value or attribute).

<xml>
<ELEMENT_A_COMPLEX>
<ELEMENT_B_STR>abc</ELEMENT_B_STR>
<ELEMENT_C_STR>abc</ELEMENT_C_STR>
<ELEMENT_D_COMPLEX>
<ELEMENT_B_STR>abc</ELEMENT_B_STR>
<ELEMENT_C_STR>abc</ELEMENT_C_STR>
<ELEMENT_A_COMPLEX>.......</ELEMENT_A_COMPLEX>
<ELEMENT_A_COMPLEX>.......</ELEMENT_A_COMPLEX>
<ELEMENT_D_COMPLEX>........</ELEMENT_D_COMPLEX>
</ELEMENT_D_COMPLEX>
</ELEMENT_A_COMPLEX>
</xml>

as you can see A and D are complex types. I have Classes for them. But they can contain object of type A,D again. So this will be nested tree depending upon XML. Now I want to create a general code which process this xml and create necessary tree with SAX implementation. Right now i'm maintaining an object which contains this,parent and child object and using Reflection API. Is there any better way to implement. Please suggest.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I actually bought something new philo Computer Support 10 08-01-2010 04:53 AM
.net takes some mesures to prevent the buffer overrun, I want to know something about it Nico C++ 2 10-15-2006 06:42 PM
Hi I have one web application and i want to get the number of users who are currently accessing the application. Also I want to get the user details of each user, which is stored in a database. How can I do this? Pls help. Getting No: and anu Java 11 05-12-2005 03:25 PM
Do you actually think of this or something else ? File content Just that C++ 6 03-21-2005 03:05 PM
LOOK! i just want to know does anyone know... Simon Egginton Javascript 3 07-26-2004 08:11 PM



Advertisments