[Zope] - ANNOUNCE: XMLConfig Product

Pavlos Christoforou pavlos@gaaros.msrc.sunysb.edu
Sat, 16 Jan 1999 02:45:06 -0500 (EST)


Hello Zopistas and Happy New Year

I have developed my first Zope Product which you can download from:

http://www.gaaros.com:8080/Avabates/Pavlos/XMLConfig.tgz

I include the doc string for information:

    """Based on XMLConfig Module.

    Instances of XMLConfig behave like python dictionaries but map
    their contents onto XML files. Modifications of either the
    dictionary or the XML file are reflected in both
    automatically.
    
    An XMLConfig instance has an attribute 'config' that holds the
    contents and can be accessed from DTML. (Could not inherit the
    XMLConfig and call its constructor. ZPublisher objects. Anyone
    has any ideas?)

    The XMLConfig docstring follows:

      Maps configuration dictionaries from Python to xml and visa-versa.

      - The user can modify the xml file or the python dictionary
      and synchronization between the two is taken care
      automatically.

      - No attributes are allowed so as to keep a simple format but
      elements can be nested. For example::

        beers=XMLConfig('beers.xml','w')
        types={'Cypriot':{'KEO::':'<em>10</em>'},'American':{'BUD':0,
        'Coors':'Sucks','Miller':0,'Saranac':10},
        'European':{'Guiness':'Excellent','Bass':10}}
        beers.update(types)
        beers['German']='All good'

      - Tags ending in :: are taken as CDATA sections.  *Note* If
      you edit the xml file directly make *SURE* that you include
      the CDATA directive. However if you add a tag ending in ::
      in the dictionary, directly or through DTML, then the
      appropriate CDATA directive will be included in the XML
      file.
      
      There is one special tag index_dtml:: which can hold DTML
      content and is the default document if present. 
      """


Good Morning

Pavlos