When I first saw E4X ( ECMAScript for XML ), I confess that I immediately fell in love with it and was very upset that there is no library for Python that emulates this syntax. But here recently I stumbled upon a wonderful thing - P4X .
The only difference between the p4x syntax and the e4x syntax is the use of underscore instead of the slider for accessing tag attributes.
An example from the author’s site (I didn’t give my own, because there’s no reason for this and this is exhaustive): ')