On Fri, 10 Aug 2007 20:40:26 +0200 Marco van de Voort <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 10, 2007 at 06:52:15PM +0200, Mattias Gaertner wrote: > > Marco van de Voort <[EMAIL PROTECTED]> wrote: > > > + end; > > > //CheckHeapWrtMemCnt('TXMLConfig.GetValue H'); > > > //writeln('TXMLConfig.GetValue END Result="',Result,'"'); > > > end; > > > > This would mean '1000' becomes the default value for all attributes, > > right? > > Yes. > > > For example GetValue('connectivity/answer_timeout/tag',2) will > > return 1000 instead of 2. > > Only if there is a nodevalue. But yes, that could be a problem. It is, because there is no function to change this value in TXMLConfig. The main purpose of TXMLConfig is to get and set some config values, not to parse an XML document. > I'm no XML wizard, which is why I actually reused code instead of > writing my own ( :-)) > > So what would be (a) more normal rule to distinguish child values from > attributes? The Document property gives full access to the internal XML. I made the FindNode method public, so you can find the node easier. Mattias _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives