This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Java in General and the fly likes setting the xml child attributes value from parent's attribute value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "setting the xml child attributes value from parent Watch "setting the xml child attributes value from parent New topic
Author

setting the xml child attributes value from parent's attribute value

bappa
Greenhorn

Joined: Mar 11, 2008
Posts: 15
Hi all,
I am working on xml parsing. My problem is to set the value of one attribute of child from the attribute value of parent. How to do this? Please help me in this concern. Thanks in advance.


S K B<br />SCJP 1.5 (83%)
Nickolas Case
Ranch Hand

Joined: Apr 26, 2008
Posts: 98
Just off the top of my head, try having a setter method in your child class set from the parent class. i.e:

public setThisAttribute(){
this.ThisAttribute = super.ThisAttribute;
}
I haven't tried to compile or anything. Good luck!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: setting the xml child attributes value from parent's attribute value