Is there any way to programmatically comment a particular child in XML? My requirement is I need to find out the attribute value from the xml.If that values exists I need to comment that particular child itself which the attribute belongs. eg:
<Company>
<employee name="John">
<dept id="Purchase"></dept>
</employee>
</company>
so here if I search for dept id "purchase" if it is found then the employee John should be able to add comment.
any idea? I am using jdom parser.