I need to check if the environment id matches I think to the db id within an xml file so I know which db elements to update. I have the code:
//get tag
Node environment = doc.getElementsByTagName("environment").item(0);
//check environment id
if(environment.getEnvironmentID().equals())
{
}
The code I have after is for the nodelist and the elements within that are to be updated. I just don't know how to finish off that check to get the right one.
xml file:
<defaultenv id = "default">
<Environment id = "name">
<Db id = "db1">
<Website> BlueHouse.co.uk</Website>
</Db>
</Environment>
</Defaultenv>
Can anyone point me in the right direction?