Robert Ramey <[EMAIL PROTECTED]> writes: > Is there a reason you sent this to me privately? >> From: David Abrahams <[EMAIL PROTECTED]> > >>I believe your assessment that some >>data structures can't be represented using XML is incorrect, and >>that's easy to prove. A serialization library which makes generation >>of XML output difficult is severely handicapped in the modern world. > > Well, I have conceded that it was preliminary. All I know about XML > is from a small book containing a concise description of XML. > > My skeptism is based on the following thought experiment: > Suppose on is given a list of polymorphic pointers, some of which > correspond to bottom node of a diamond in heritance structure > and some of which are repeated in the list and serialized > some where else as well. > > a) How would such a thing be represented in XML?
I'm not an XML expert, but I know a little. It's basically a tree structure with cross-references. That means you can represent an arbitrary graph. If the pointers all correspond to the bottom node in a diamond, the problem is actually relatively easy, since you don't have to worry about ambiguous subobjects of the same type. Repetitions in the list could be handled with cross-references. Alternatively, the whole list of pointers could be handled with cross-references, and the set of objects in question could be stored in a separate XML structure. I probably haven't given enough detail here to be convincing. Some handwaving on my part is a product of not knowing somie XML details. > b) Could be loaded back to create an equivalent structure? Sure, why not? > c) Would it be useful for anything other than this serialization system? Why is that an important question? > If someone can assure me that the answers to all three of the above > is yes then it should be possible - otherwise not. Given that its > "easy to prove" these questions should be easy to answer in > a convincing way. -- David Abrahams [EMAIL PROTECTED] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost