httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Carleton <...@linux-info.net>
Subject Re: [users@httpd] Apache configuration files parsing utilities
Date Sat, 08 Mar 2003 15:30:59 GMT
On Fri, Mar 07, 2003 at 04:14:39PM +0100, Coursimault, Jean-marc wrote:
> Hello, 
>  
> I'd like to use apache-like configuration files in my C++
> application (Linux / Windows / Solaris), which is not related to
> Apache in any way.  I don't need a GUI to set up preferences, only
> read  them in my app.
 
You know what the apache configureation files reminds me of?  It is
not an exact match, but it is relativily close... XML!

> I need both "include" capabilities as in "include ./otherfile.conf" a,d
> hierarchical values, as in
> <Virtual Host>
>    <Directory kjhkjh>
>      # my comment
>       mykey=myvalue
>       ....
>     </Directory>
> </Virtual Host>
> 
> Ideally, the parsing of these configuration files should be
> possible and easy in other languages, such as Java, possibly C#
> and Perl.  The parsing utilities should not have (too many)
> dependencies.

There are MANY advantages to using XML.  There are parsers in
virtually all languages now.  This makes reading in the file on any
plateform in any language pretty straight forward.  This will also
open up the world of XSLT to you.  XSLT will allow you to translate
the XML into something more readable.  

I have written some utilities for work that use XML to store
configuration info.  Then I have created a XSLT file to translate
the file into HTML so that someone can simply bring the XML up in a
browser and have a nicely formated document to look at.

Sam

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message