How do I load properties from XML file?
Category: java.io, viewed: 13943 time(s).
Reading XML properties can be easily done using the Properties.loadFromXML() method. Just like reading the properties from a file that contains a key=value pairs, the XML file will also contains a key and value wrapped in the following XML format.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>Application Configuration</comment> <entry key="data.folder">D:\App\Data</entry> <entry key="jdbc.url">jdbc:mysql://localhost/mydb</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!
