Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
bappa
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nickolas Case
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!