*
The moose likes XML and Related Technologies and the fly likes XML Property File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Property File" Watch "XML Property File" New topic
Author

XML Property File

praveen sharma
Ranch Hand

Joined: May 27, 2006
Posts: 44
hi ranches,

can anyone help me in using X M L property file reading. my X M L File is in this format


i am not able to create a DTD properlly and getting error while reading so can anyone tell me how to prepare DTD For the following field.waiting for your reply please help urgently required
Amol Nayak
Ranch Hand

Joined: Oct 26, 2006
Posts: 218
You are not required to have a dtd or xsd unless you need to validate it before parsing. For parsing you can use SAX or DOM. Use DOM as it is simple to understand and use.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Moving to XML and related technologies


[My Blog]
All roads lead to JavaRanch
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
If you are using JDK 1.5 and your configuration file is only of type key value pair then you might want to use java.util.Properties which not only supports .properties file , but also a simple xml file.For more information you might want to refer the Javadoc for JDK1.5

Otherwise you can load the xml file into a DOM and then use XPath to fetch values from it.


Rahul Bhattacharjee
LinkedIn - Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML Property File
 
Similar Threads
Getting Error DataSourceProxy
org hibernate InvalidMappingException : Could not parse mapping document from invalid
Error: Error creating bean with name 'dataSource'
Hibernate--->Sqlserver
Hibernate 2.1 and Oracle 9.2.0.4 connection