4

Is there a Java library that reads configuration files like those pseudo-XML used by Apache Http? Example:

some_variable true

<myconf>
    order   Cache1
    order   Cache2

    <Cache>
        can_search  yes
        can_count   yes
    </Cache>

    <Cache2>
        can_search  yes
        can_count   yes
    </Cache2>
</myconf>

<details>

    host    192.168.10.1
    port    222

</details>

Basically is there a Java replacement for Perl module Config::General? I need only to read the files, writing is not necessary.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
kazanaki
  • 7,988
  • 8
  • 52
  • 79
  • I have been looking for something like this for my HTTPD java Web Application Administration as well! – yannisf May 23 '11 at 09:59
  • 1
    possible duplicate of [Is there any Java Library to operate on unix config files like http.conf](http://stackoverflow.com/questions/3243686/is-there-any-java-library-to-operate-on-unix-config-files-like-http-conf) – daxim May 23 '11 at 10:44

2 Answers2

2

I finally created my own library for this.

https://github.com/kkapelon/Apache-Httpd-conf-Reader

kazanaki
  • 7,988
  • 8
  • 52
  • 79
1

According to another question posted on SO, no Java library exists for the Apache configuration files.

Community
  • 1
  • 1
Vivien Barousse
  • 20,555
  • 2
  • 63
  • 64