How do I store properties as XML file?
Category: java.io, viewed: 10230 time(s).
In the previous example, How do I load properties from XML file? we read properties from XML file. Now it's the turn on how to store the properties as XML file.
The saved XML file will look like the properties file below:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>Database Configuration</comment>
<entry key="database.password">root</entry>
<entry key="database.url">jdbc:mysql://localhost/mydb</entry>
<entry key="database.type">mysql</entry>
<entry key="database.username">root</entry>
</properties
Can't find what you are looking for? Join our FORUMS and ask some questions!
Download Hundreds of Complimentary Industry Resources
Get hundreds of popular Industry magazines, white papers, webinars, podcasts, and more;
all available at no cost to you. With more than 600 complimentary offers, you'll find
plenty of titles to suit your professional interests and needs.
Click Here and Sign up today!
