• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

code to read the xml and also overide the value of certain attributes in xml at runtime itself

 
Saral Saxena
Ranch Hand
Posts: 203
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks ,

I have got the following xml ...



Now I need java code that wil read the values of the attributes like lastname ,nickname,salary,age at the runtime and also I want to override the value of the lastname from mook to saral saxena then MY JAVA CLASS WOULD DO IT AT RUNTIME..!!! Please guide me for the code of java class..!!
 
fred rosenberger
lowercase baba
Bartender
Posts: 12186
34
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There should be plenty of xml parsers out there. Have you tried googling for any of them? The very first hit I got looks promising for what you need.
 
Saral Saxena
Ranch Hand
Posts: 203
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Fred ,

yeah I have seen sax parser and dom parser ....I need if somebody can come up with the java code through which I can look upon and see the flow..!!this will make my understanding more clearer..!! thanks in advance..!!
 
fred rosenberger
lowercase baba
Bartender
Posts: 12186
34
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you expect someone to provide you the code, you are in the wrong place. That isn't what we do here.

We will help YOU write the code yourself. I suggest you spend some time reading our HowToAskQuestionsOnJavaRanch FAQ. Specifically:

ShowSomeEffort
PatienceIsAVirtue
NotACodeMill
DoYourOwnHomework
PostRealCode
 
Saral Saxena
Ranch Hand
Posts: 203
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I have written the folowing code...

 
Saral Saxena
Ranch Hand
Posts: 203
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,

Please advise on this ..I am stuck up on this...doing R&D..!!
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok - please explain what the code does; what is the output you got; exceptions thrown, etc.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12186
34
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the code compile? Do you know HOW to compile it? Does it run? Does it crash?

Clearly, you didn't read the FAQ as I suggested. If so, you'd know to TellTheDetails.

Folks around here tend to put as much effort into answering your question as you put into asking it. Since you are putting in almost nothing, you are getting out almost nothing. You should make it easy for us to help you, and you are not. So, most folks figure they can either spend a LOT of time trying to figure out what help you need and ultimately help one person, or spend a little time helping each of a lot of folks. Most people I know will choose the latter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic