This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Problem with parsing I need to insert...

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
Arun M'Purushothaman
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
BWA HA HA HA HA HA HA! Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!