aspose file tools
The moose likes Java in General and the fly likes code to read the xml and also overide the value of certain attributes in xml at runtime itself 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 » Java » Java in General
Reply Bookmark "code to read the xml and also overide the value of certain attributes in xml at runtime itself" Watch "code to read the xml and also overide the value of certain attributes in xml at runtime itself" New topic
Author

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

Saral Saxena
Ranch Hand

Joined: Apr 22, 2011
Posts: 202

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

Joined: Oct 02, 2003
Posts: 9946
    
    6

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.


Never ascribe to malice that which can be adequately explained by stupidity.
Saral Saxena
Ranch Hand

Joined: Apr 22, 2011
Posts: 202

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

Joined: Oct 02, 2003
Posts: 9946
    
    6

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

Joined: Apr 22, 2011
Posts: 202

Hi ,
I have written the folowing code...

Saral Saxena
Ranch Hand

Joined: Apr 22, 2011
Posts: 202

Hi Folks,

Please advise on this ..I am stuck up on this...doing R&D..!!
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
Ok - please explain what the code does; what is the output you got; exceptions thrown, etc.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 9946
    
    6

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: code to read the xml and also overide the value of certain attributes in xml at runtime itself
 
Similar Threads
Unable to read XML tags using DOMparser in JAVA
XML file parsing in Java using SAX
Creating a Class on-the-fly
Simple inheritance example
Connection refused: connect in faces-config.xml