A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCM Java EE 6 Enterprise Architect Exam Guide
this week in the
Product and Other Certifications
setting child attribute from parent attribute
Joined: Mar 11, 2008
Mar 27, 2008 22:00:00
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%)
Joined: Jan 04, 2007
Apr 14, 2008 00:52:00
NamedNodeMap parentMap = parentElement.getAttributes(); Node attributeNode = parentMap.getNamedItem("ParentAttribute"); String attribute = attributeNode.getNodeValue(); childElement.setAttribute("Attr",attribute);
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: setting child attribute from parent attribute
setting the xml child attributes value from parent's attribute value
Setting the attribute of child node by parent node attribute value
what is the difference?
how to get child attribute in parent tag
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014