You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Coursimault, Jean-marc" <Co...@xrce.xerox.com> on 2003/03/07 16:14:39 UTC

[users@httpd] Apache configuration files parsing utilities

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.
 
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.
 
I'm aware of several efforts, notably UnixConfig, to do universal
configuration files, but they don't seem very advanced. The Java Preferences
API does not seem to have any C++ counterpart. And I think that the Apache
conf files are "just right".
 
And I need a LGPL-like licence, since my app will be commercial.
 
Does anyone know if I could sort of extract the configuration-files parsing
utilities from Apache ?

-- Jean-Marc
____________________________________________________________
Jean-Marc Coursimault         |
Xerox Research Centre Europe  | Tel   +33 (0)4 76 61 51 82
Systems Dev. & Engineering    | Fax   +33 (0)4 76 61 51 99
6, chemin de Maupertuis       | 
38240 Meylan (France)         | coursimault@xrce.xerox.com
  

 

Re: [users@httpd] Apache configuration files parsing utilities

Posted by Sam Carleton <sa...@linux-info.net>.
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


Re: [users@httpd] Apache configuration files parsing utilities

Posted by ge...@ameritech.net.
Since it's an open source product, sure.  Getting the code shouldn't be 
any kind of a problem.  I'm not up on the legalities of using it in a 
commercial app though.

At 16:14 (UTC+0100) on Fri, 7 Mar 2003 Coursimault, Jean-marc said:

= 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.
=  
= 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.
=  
= I'm aware of several efforts, notably UnixConfig, to do universal
= configuration files, but they don't seem very advanced. The Java Preferences
= API does not seem to have any C++ counterpart. And I think that the Apache
= conf files are "just right".
=  
= And I need a LGPL-like licence, since my app will be commercial.
=  
= Does anyone know if I could sort of extract the configuration-files parsing
= utilities from Apache ?
= 
= -- Jean-Marc
= ____________________________________________________________
= Jean-Marc Coursimault         |
= Xerox Research Centre Europe  | Tel   +33 (0)4 76 61 51 82
= Systems Dev. & Engineering    | Fax   +33 (0)4 76 61 51 99
= 6, chemin de Maupertuis       | 
= 38240 Meylan (France)         | coursimault@xrce.xerox.com
=   
= 
=  
= 


---------------------------------------------------------------------
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