<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Base-Art / EaseXML</title>
<link>http://base-art.net</link>
<description>Phil's blog</description>
<language>en</language>
<copyright>The contents of this blog are available for non-commercial use only.</copyright>
<generator>Alinea http://pythonfr.org/alinea/</generator>





<item>
<title>XMLObject mutates to EaseXML</title>
<link>http://base-art.net/Articles/25/</link>
<guid isPermaLink="true">http://base-art.net/Articles/25/</guid>
<description><![CDATA[
&lt;p&gt;In a previous post, i was discussing about Project name clashing. Since then i decided to find a new name for the Python/XML data binding project i'm maintaining ... Which is EaseXML !&lt;/p&gt;
&lt;p&gt;&lt;a class="reference" href="http://easexml.base-art.net/"&gt;EaseXML&lt;/a&gt; 0.2.0 is out. I hope it won't collapse with another project now :)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt;: The project homepage is now &lt;a class="reference" href="http://xmlobject.base-art.net/"&gt;mirrored&lt;/a&gt;&lt;/p&gt;

]]></description>
<dc:creator>Philippe Normand</dc:creator>
<dc:date>2004-12-12T17:26:00Z</dc:date>
</item>


<item>
<title>Don't you have your XMLObject yet ? oh sweet heart :(</title>
<link>http://base-art.net/Articles/22/</link>
<guid isPermaLink="true">http://base-art.net/Articles/22/</guid>
<description><![CDATA[
&lt;p&gt;Via DailyPython URL!&lt;/p&gt;
&lt;pre class="literal-block"&gt;
Gre7g Luterman: XMLObject_ [XMLObject is a Python module that simplifies the
handling of XML streams by converting the data into objects.]
&lt;/pre&gt;
&lt;p&gt;That's kind of fun and reminds me the story about Python ALSA wrappers. People do things in their corner. And the final lambda user get lost in the jungle of XXX softwares doing about the same work.&lt;/p&gt;
&lt;p&gt;And in this case, especially using &lt;strong&gt;the same name&lt;/strong&gt; for each project. So we have about three different XMLObject projects:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference" href="http://zope.org/Wikis/zope-xml/XMLObject"&gt;Zope XMLObject&lt;/a&gt; .. for Zope,&lt;/li&gt;
&lt;li&gt;&lt;a class="reference" href="http://xmlobject.base-art.net"&gt;Base-Art XMLObject&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;Last but not least &lt;a class="reference" href="http://xmlobject.sf.net"&gt;Gre7g XMLObject&lt;/a&gt; ..&lt;/li&gt;
&lt;li&gt;Not to mention an XmlObject in Java :)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Are you confused ? Well i probably shouldn't have named my stuff like the Zoped one, i'm guilty here. Finally one more or one left, no difference.&lt;/p&gt;
&lt;p&gt;-- Reserve your XMLObject jungle map to your favorite receller :)&lt;/p&gt;

]]></description>
<dc:creator>Philippe Normand</dc:creator>
<dc:date>2004-10-29T11:35:00Z</dc:date>
</item>


<item>
<title>XMLObject 0.0.1</title>
<link>http://base-art.net/Articles/9/</link>
<guid isPermaLink="true">http://base-art.net/Articles/9/</guid>
<description><![CDATA[
&lt;p&gt;The first release of XMLObject is out. This is a small project I
started after writting this &lt;a class="reference" href="http://base-art.net/wk/Article/5.html"&gt;post&lt;/a&gt;. I tried to apply on Pypi but it
seems to be bugged w/ email sending :( Anyway annoucement on Freshmeat
should come shortly :)&lt;/p&gt;
&lt;p&gt;XMLObject is hosted on &lt;a class="reference" href="http://xmlobject.base-art.net/"&gt;http://xmlobject.base-art.net/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-- Enjoy !&lt;/p&gt;

]]></description>
<dc:creator>Philippe Normand</dc:creator>
<dc:date>2004-05-23T19:15:09Z</dc:date>
</item>


<item>
<title>Of Python and XML</title>
<link>http://base-art.net/Articles/5/</link>
<guid isPermaLink="true">http://base-art.net/Articles/5/</guid>
<description><![CDATA[
&lt;p&gt;Obviously I'm not the first to believe in the power of Python to ease XML management. Of course there are DOM and SAX which are meant to provide uniform (whatever language we use) XML APIs. After using these for a little while, I'm now convinced OO features should be more used, especially meta-programming.&lt;/p&gt;
&lt;p&gt;Let's get an example. For a school IT project, I needed to provide an OO (partial) abstraction of a DTD. So I started making a class for each XML item type defined in the DTD. The process was always the same:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;if item A includes a list of B items, there was a need for get/set methods to access the given list&lt;/li&gt;
&lt;li&gt;attributes were dealed as Python class variables     (&lt;cite&gt;__getattr__&lt;/cite&gt;, &lt;cite&gt;__setattr__&lt;/cite&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And so on. Then I realized that, the maintenance process would be painfull it the DTD had to be revised. In fact the OO abstraction becomes fully coupled to the DTD.&lt;/p&gt;
&lt;p&gt;After that I discovered Python &lt;a class="reference" href="http://members.rogers.com/mcfletch/programming/metaclasses.pdf"&gt;MetaClasses&lt;/a&gt;. Python is not the only language to provide meta-programming. But, I find it easier to use than SmallTalk's one for example. So now we can imagine things like:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
class ItemA(XMLObject):
    BItems = XMList(ItemB)
    index = XMLAttribute(type = StringType)

A = ItemA(someXMLData)
print list(A.BItems)
print A.index
A.index = 'foo'
&lt;/pre&gt;
&lt;p&gt;This concept comes directly from &lt;a class="reference" href="http://sqlobject.org"&gt;SQLObject&lt;/a&gt; (Thanks Ian for this great thing). Adapting these design concepts to the (XML, Python) couple would be quite great.&lt;/p&gt;

]]></description>
<dc:creator>Philippe Normand</dc:creator>
<dc:date>2004-04-21T21:23:02Z</dc:date>
</item>



</channel>
</rss>