Link to home
Start Free TrialLog in
Avatar of lcor
lcor

asked on

JDOM Modify XML

I have to use the JDOM java api.  Can anyone point me to some examples or let me know how to change the following xml using JDOM?

I have to locate the correct entity (e.g., entity = 50).  If there isn't a value attribute, I have to create a value attribute set to some numeric number.  If there is a value attribute, I have to change its number.
<map>
    <data> 
        <entity id="45" value="234" />
        <entity id="50" />
    </data>
</map>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial