Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
| Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 11th, 2008, 09:06 AM
Registered User
 
Join Date: Mar 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML Config reader

I have a config reader in my app that reads a text file. I would like to replace this with an XML version. Does anyone have any suggestions?

My system has a java component that I will probably write in Java, plus 2 * .Net console applications which will be using .NET XML code.

This is my first attempt at XML.

Is it possible to write a generic config reader class (per language) where validation of a config.XML is stored in an associated schema or DTD, instead of in the config class, i.e., decouple it? Is that what it is all about?

Any help appreciated.

Thx


 
Old March 11th, 2008, 09:11 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

In .Net XML can be validated against a Schema quite easily using a XmlReader and XmlReaderSettings.

http://msdn2.microsoft.com/en-us/library/hdf992b8.aspx

I'm sure similar validation is possible in Java.

/- Sam Judson : Wrox Technical Editor -/




Similar Threads
Thread Thread Starter Forum Replies Last Post
web.config vs. app.config darlo Visual Studio 2005 11 August 20th, 2008 07:23 AM
Folder deletion with XML Config Peroni Beginning VB 6 5 January 16th, 2008 08:11 PM
xml text reader from Web Service djcowbell .NET Web Services 4 June 27th, 2007 08:40 AM
Config error--machine.config sunithavasudevan ASP.NET 1.0 and 1.1 Professional 2 October 10th, 2006 07:14 AM
Read XML Config File From Within EJB JAR leojhartiv J2EE 0 October 6th, 2003 03:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.