[BangPypers] Access xml file form python script

Pradeep Gowda pradeep at btbytes.com
Sun Oct 31 20:24:18 CET 2010

On Sun, Oct 31, 2010 at 7:42 AM, Avinash TM <avinashtm at gmail.com> wrote:
> Hi All,
> I have created a simple xml document i.e., preferences.xml as follows
> <?xml version="1.0"?>
> <object>
>  <object name="category" value="cricket">
>   <property name="title">Cricket</property>
>   <property name="subscribers">
>    <element name="avinash"/>
> <element name="prashant"/>
>   </property>
>  </object>
> </object>

This looks like xml generated by a Microsoft product, and not by/for a human..

How is this better than:

 <category name="cricket" title="Cricket">
    <subscriber name="Avinash" />
    <subsriber name="Prashanth" />

Why create child nodes when attributes are sufficient?


More information about the BangPypers mailing list