Getting values from xml to .properties file in Java

tmclean20

New Member
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? --ThanksException while using loadFromXMLException in thread "main" java.util.InvalidPropertiesFormatException: org.xml.sax.SAXException: Invalid system identifier: http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd 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: http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd 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 moreJava Result: 1
 
Back
Top