title: Getting values from xml to .properties file in Java
body: <p>I have db connection related properties in a .xml file. I want to use the same values in a .properties file. Is it possible to get values from .xml file and set to .properties? </p>
  
  <p>--
  Thanks</p>
  
  <p>Exception while using <strong>loadFromXML</strong></p>
  
  <p>Exception in thread "main" java.util.InvalidPropertiesFormatException: org.xml.sax.SAXException: Invalid system identifier: <a href="http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd" rel="nofollow">http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd</a>
      at java.util.XMLUtils.load(XMLUtils.java:76)
      at java.util.Properties.loadFromXML(Properties.java:868)
      at com.generalsentiment.test.quartz.CronTriggerExample.run(CronTriggerExample.java:40)
      at com.generalsentiment.test.quartz.CronTriggerExample.main(CronTriggerExample.java:117)
  Caused by: org.xml.sax.SAXException: Invalid system identifier: <a href="http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd" rel="nofollow">http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd</a>
      at java.util.XMLUtils$Resolver.resolveEntity(XMLUtils.java:190)
      at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
      at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
      at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:102)
      at java.util.XMLUtils.load(XMLUtils.java:74)
      ... 3 more
  Java Result: 1</p>