Relating to recent discussion of whether arbitrary Zope objects can be
represented meaningfully in XML, there are a few articles and scripts by
David Mertz that are interesting in the same vein:
XML Matters #1: On the 'Pythonic' treatment of XML documents as objects
http://www-106.ibm.com/developerworks/library/xml-matters1/index.html
XML Matters #2: On the 'Pythonic' treatment of XML documents as objects(II)
http://www-106.ibm.com/developerworks/library/xml-matters2/index.html
XML Matters #11: Revisiting xml_pickle and xml_objectify
http://www-106.ibm.com/developerworks/library/x-matters11.html#h27947
Basically there are two scripts, xml_pickle which serializes and
deserializes Python objects as XML instead of in the Pickle format, and
xml_objectify which reads in a dom, but converts it to an ordinary
python object so you don't have to walk through all the DOM rigamarole
just to grab the attributes and sub-elements. This is similar in flavor
to JDOM, which presents the DOM using standard Java tools and idioms,
but for Python.
Since ordinary Python objects can be treated as XML, it seems to me that
it shouldn't be hard to treat random Zope objects as DOM in ZDOM, which
is where I was coming from when I suggested that we have a default
representation for all objects and only use a registry for objects which
need (or want) to be treated specially. If there has to be a registry
entry describing how to handle every Zope object in use, well, that just
doesn't seem realistic or feasible.
My $0.02CAD
--Dethe
--
Dethe Elza (delza@burningtiger.com)
Chief Mad Scientist
Burning Tiger Technologies (http://burningtiger.com)
Living Code Weblog (http://livingcode.ca)
represented meaningfully in XML, there are a few articles and scripts by
David Mertz that are interesting in the same vein:
XML Matters #1: On the 'Pythonic' treatment of XML documents as objects
http://www-106.ibm.com/developerworks/library/xml-matters1/index.html
XML Matters #2: On the 'Pythonic' treatment of XML documents as objects(II)
http://www-106.ibm.com/developerworks/library/xml-matters2/index.html
XML Matters #11: Revisiting xml_pickle and xml_objectify
http://www-106.ibm.com/developerworks/library/x-matters11.html#h27947
Basically there are two scripts, xml_pickle which serializes and
deserializes Python objects as XML instead of in the Pickle format, and
xml_objectify which reads in a dom, but converts it to an ordinary
python object so you don't have to walk through all the DOM rigamarole
just to grab the attributes and sub-elements. This is similar in flavor
to JDOM, which presents the DOM using standard Java tools and idioms,
but for Python.
Since ordinary Python objects can be treated as XML, it seems to me that
it shouldn't be hard to treat random Zope objects as DOM in ZDOM, which
is where I was coming from when I suggested that we have a default
representation for all objects and only use a registry for objects which
need (or want) to be treated specially. If there has to be a registry
entry describing how to handle every Zope object in use, well, that just
doesn't seem realistic or feasible.
My $0.02CAD
--Dethe
--
Dethe Elza (delza@burningtiger.com)
Chief Mad Scientist
Burning Tiger Technologies (http://burningtiger.com)
Living Code Weblog (http://livingcode.ca)