I am faced with the problem of representing a Venn diagram as a tree structure in order to process the information as XML.
Do anyone have an elegant way for doing this, or maybe some acute observations?
Please note that I am not able to handle individual elements in the sets. Diagrams would be illustrating situations equivalent to “There are 20 students in all, of which 5 do sports, 8 play chess and 3 do both”.
From your description my understanding is you are talking about dealing with the aggregate data (count for each set) rather than discrete items. So with that assumption, I would first look at how another code base represents Venn Diagrams (Google Chart API)
The Google chart API represents Venn Diagrams using seven values. I have extracted the descripions below from here: http://code.google.com/apis/chart/image/docs/gallery/venn_charts.html
We can apply the same approach to represent your problem domain in XML:
With this information you know enough to draw the diagram.