Re: Code review comment: "Noone uses tokens anymore"



"Kevin J. Phillips" <knp@xxxxxxx> wrote in message
news:skCaf.15$7c2.1061@xxxxxxxxxxxxxxx
>
> The second part of his comment, to consider using XML, is worth looking
> at. I am mulling it over...
>
> BTW, the configuration file is pretty simple. It's just a file with
> lines like below:
>
> ; Comment lines begin with a semi-colon
> var = 3.141
> var2 = plugh
> var3 = "message ; hello" ; Inline comment
> var4 = 'When I saw him, I said "Hello!"'

Since all I see is a flat properties-type file, I don't know
why he'd suggest XML for a configuration file. Talk about
overly complex - for the person who has to modify the config
file.

I parse files like this all the time (except I'm usually
working with Bourne shell and sed, not C). If it doesn't
get much more complex than what you've shown, I don't
know what his problem is, except, probably, he likes XML
and thinks one tool is appropriate for everything.
(Or other, similar, files in the system already use XML
and it would be consistent to use it here even though
it is overkill - that's not unreasonable.) -Wm




.



Relevant Pages

  • Re: DMProcessConfigXML CM_MAPPINGS
    ... documentation says is used for the standard mappings - and user mappings start at 0x1000000. ... Also while the first code example is 99% correct, you should free the returned string pointer with free not LocalFree e.g. ... /// Configuration Service Providers process ... /// and returns metadata for any XML parm elements ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: DMProcessConfigXML CM_MAPPINGS
    ... Also while the first code example is 99% correct, you should free the returned string pointer with free not LocalFree e.g. ... /// Configuration Service Providers process ... /// and returns metadata for any XML parm elements ... private extern static UInt32 DMProcessConfigXML(string xmlIn, UInt32 flag, out IntPtr xmlOutPtr); ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: Wanting to read XML blob from configuration
    ... Get the XML for a section. ... As I said I think the .NET model is brain ... NET 2.0 configuration model? ... a section to be avalid in .net application config file. ...
    (microsoft.public.dotnet.framework)
  • Re: app.config custom types
    ... Keep in mind my sample is not a direct KB on "how to implement a custom ... you gotta write the glue code which takes XML and converts it to a real ... This entry shows how to write a custom configuration handler (based on ...
    (microsoft.public.dotnet.languages.csharp)
  • DMProcessConfigXML CM_MAPPINGS
    ... I am using the following code to try to add a URL exception to the networks ... /// Configuration Service Providers process ... /// and returns metadata for any XML parm elements ... /// String of valid XML containing configuration data ...
    (microsoft.public.dotnet.framework.compactframework)