I have an xml file. The xml file contains different db's but I want to use- db1 , db2 , db3.
I have the code in a xmlwrite.java file to update the existing tags in the xml file where the 3 db's are. I have a method in the xmlwrite class that passes through document
doc and MainEnvironment environment (MainEnvironment is a class) (document doc is used as part of documentbuilder)
The MainEnvironment.java file has the 'envrionmentID' in it - it's declared globally and is get and set.
Currently I am getting it like:
then I proceed to use code that will update existing elements in the xml file (I have a few of these to update diff elements):
then I also have the code to update the file:
Because I have 3 different db's I want to use I need to specify the environmentID so that it will update the correct db. I need it to sort of update the other two as well even though no new data goes into them.
Below is an example of what the xml file looks like:
I managed to read it fine just updating the file I'm not 100% on due to the environment id.