To elaborate a bit I have used Borland xml databinding with a dtd to create classes that read/write an xml doc
conforming to a dtd. So far so good... if I want to read a whole document or write a whole document then I just
call the marshal/unmarshal methods of the object representing the document root.
My question is whether or not I can write/read only part of a document. For example consider a book with
elements for title, contents, chapters and index. If I have an xml fragment that represents one chapter can I
use the generated classes to read just that fragment and return a class instance representing that chapter?
Going the other direction if I have the complete book represented by instantiated classes could I call a method
(is there such a method) in the class representing a chapter element and have it write out the xml for just that
chapter?
Or are things set up when the marshal/unmarshal method for the root is called that are necessary for the proper
fuctioning of the methods lower in the tree?
An example of why I might want to do this: a user has another app that would generate the xml for a chapter and
paste it to the clipboard and I would like my app to generate the proper subtree by reading the clipboard
contents, so that I can just add that child to the existing tree. The real app is more complex but the principle
is the same.
Thanks in advance!