As others have noted, it is not clear what you need to know, but you have provided some of what you need to know. Note that Venn diagrams present data in a way that is similar to the Disjunctive Normal Form for Boolean operators. That is, the Universe is a union of disjoint sets defined by the intersection of sets and their compliments. For example, with sets A, B, and C, you get the following counts (where a single quote means “compliment”):
ABC ABC' A B'C A B'C' A'B C A'B C' A'B'C A'B'C'
You may notice that these are binary values above set names. So, basically, if you have a Venn diagram between N sets, you need to know the number 2 ^ n. From this you can restore all the necessary information. (for example, “A” is an ABC union ABC union “AB'C AB'C union”)
From there, representing as an XML file is just an exercise - you need to know how many sets, their name and for each nonzero intersection their count and which sets are complemented at the intersection. (You can store more explicitly if you want, but XML is already very concise.)
Hope this helps - even if it's late!
source share