On Wed, 31 Jan 2001, Jonas Nordström wrote:

> I have a proxy-application that I want to make as generic as possible by
> using configure files.
> I have a configure file that looks something like:
>
>
> <Interface>
>    ko-web.ei.sigma.se
> </Interface>
>
> <Label information>
>    <DefaultSite>
>       info.ei.sigma.se
>    </DefaultSite>
>    <Sites>
>       info.ei.sigma.se
>          <Block>
>             Order deny, allow
>             Deny All
>             Allow nisse.ei.sigma.se
>          </Block
>       stodjande.ei.sigma.se
>       lopande.ei.sigma.se
>       css.ei.sigma.se
>    </Sites>
> </Label>
>
> Is there a standard way of reading such file into a perl-structure (hash or
> object)?
> I have solved it by just reading the file and use regexps to filter the
> information. It works, but the code will be hard to maintain.

Looks like a job for XML::Simple.

-- 
<Matt/>

    /||    ** Director and CTO **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // **     Personal Web Site: http://sergeant.org/     **
     \\//
     //\\
    //  \\

Reply via email to