Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 19009 invoked by uid 6000); 13 Oct 1999 04:07:45 -0000 Received: (qmail 19000 invoked from network); 13 Oct 1999 04:07:43 -0000 Received: from rod.gstis.net (HELO wenet.net) (207.170.196.195) by taz.hyperreal.org with SMTP; 13 Oct 1999 04:07:43 -0000 Received: from paris (cvx01-1003.sfo.wenet.net [206.169.251.241]) by wenet.net (8.9.3/8.9.3) with SMTP id VAA19824; Tue, 12 Oct 1999 21:06:00 -0700 (PDT) Message-ID: <006501bf1530$44876280$ba6dfea9@paris> From: "James Davidson" To: Cc: References: <3801D8DD.F6C88C1C@db.com> <3801EA44.C7F97663@algroup.co.uk> <005901bf1416$a7558920$1609fea9@paris> <380393A3.BB34025E@algroup.co.uk> Subject: Re: XML configuration revisited Date: Tue, 12 Oct 1999 21:06:02 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org > I kinda like the approach but ... > > a) How do you use it if you aren't writing Java? Just use DOM -- get rool element (verify it's "project") get the target elements for each target, get it's children tags for each child tag, do something that was associated with that name You should be able to do that much with a C based XML parser > b) Where does it tell me about att1/att2 in the example above? Unfortunatly, that's where my example is Java specific -- I'm using reflection to pipe those straight into the class... For example, I'd reflect into an instance of the class that is associated with "newtask" (in my previous email org.apache.reallycool.TaskClass) and use JavaBeans setter methods -- this means that I can use the java.beans.* library to find the method for setAtt1(String s) and setAtt2(String s) from that instance class without knowing its exact type. I set the attributes, and then, at the appropriate time (as it is a build system) I call an exec method that fires and uses whatever configuration was reflected into it to do it's job. I don't know how to do this last part in C as I'm *not* a good C hacker (I had a different background that led me into Java...) The problem of course with this example is that this isn't exactly the same way you'd do things for a server configuration file -- but I wanted to make sure that people aren't limiting themselves to "XML...must...have...DTD" .duncan