in reply to XML Attribute vs Element

Hi, I had the same doubt about generating attributes for an element and the reply by pjotrik sorted it out... partially.

I still wonder what I can do to generate an attribute for e rather than for the root element.

That is, I would like my data to look like
<root> <e a="attribute value">element value</e> </root>
rather than
<root a="attribute value"> <e>element value</e> </root>
Any ideas? I am sure it's simple but I'm inexperienced...

Thanks a lot!
xinelo