Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes XML and Related Technologies and the fly likes Problem with parsing I need to insert... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "Problem with parsing I need to insert..." Watch "Problem with parsing I need to insert..." New topic
Author

Problem with parsing I need to insert...

Arun M'Purushothaman
Greenhorn

Joined: Mar 14, 2003
Posts: 16
Hey guys if u or any of ur friends who knows the following parses plz tell me a solution for solving the the following problem. This is not updating its inserting... k,,

dom parsers....
jdom parser
sax parser

Need ur help...

I have an XML file.....
The procedures are like this...
A User will get registerd with the site...and fill in the details ....
AT the end the enterd detaisl will get stored into the XML file...
And on every visit the user do.....the user will attend the test online and at the end of the test....The marks will be included ...

SO now the XML file will ook like this....


1.During registraion

<UserId>987979
<name>GHanesh</name>
<age>24</age>
<sex>M</sex>
<qualification>B.E</qualification>
</UserId>


2.At the end of the Ist Test
<UserId>987979
<name>GHanesh</name>
<age>24</age>
<sex>M</sex>
<qualification>B.E</qualification>
<test1>57</test1>
</UserId>

3.At the end of the IInd Test
<UserId>987979
<name>GHanesh</name>
<age>24</age>
<sex>M</sex>
<qualification>B.E</qualification>
<test1>57</test1>
<test2>78</test2>
</UserId>

4.At the end of the IIIrd Test
<UserId>987979
<name>GHanesh</name>
<age>24</age>
<sex>M</sex>
<qualification>B.E</qualification>
<test1>57</test1>
<test2>78</test2>
<test3>23</test3>
</UserId>

Now if u see the tags very closely...
The <test> tag gets inserted....on every end of the exam......
So how can this be achived

pls help me out....


Nothing is impossible, even the word impossible says 'i m possible'.
Arun M'Purushothaman
Greenhorn

Joined: Mar 14, 2003
Posts: 16
You can even tell me the solution for the following issue.. I wanted the output this.. way

At the end of the Ist Test

<UserId>987979
<name>GHanesh</name>
<age>24</age>
<sex>M</sex>
<qualification>B.E</qualification>
<test>
java_57
</test>
</UserId>


At the end of the IInd Test

<UserId>987979
<name>GHanesh</name>
<age>24</age>
<sex>M</sex>
<qualification>B.E</qualification>
<test>
java_57,c++_87
</test>
</UserId>

At the end of the IIIrd Test

<UserId>987979
<name>GHanesh</name>
<age>24</age>
<sex>M</sex>
<qualification>B.E</qualification>
<test>
java_57,c++_87,c_90
</test>
</UserId>
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Problem with parsing I need to insert...
 
Similar Threads
Multiple ATTLIST declarations for a attribute!
Jsp flow
Need Parser program to write elements into xml file..!
how to read a simple xml file using spring
what is wrong with this xml code