Article View: borland.public.jbuilder.xml
Article #22possible to read/write only part of an xml doc?
From: J. User
Date: Thu, 07 Oct 2004 18:52
Date: Thu, 07 Oct 2004 18:52
22 lines
2192 bytes
2192 bytes
Hi, 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!
Technical Details
Message-ID:
<MPG.1bcf3039be2eb2f2989686@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: fcb34,5b1cdc21c095f023,start X-Google-Attributes: gidfcb34,public X-Google-Language: ENGLISH,ASCII-7-bit From: J. User <nospam@here.please.org> Newsgroups: borland.public.jbuilder.xml Subject: possible to read/write only part of an xml doc? Date: Thu, 7 Oct 2004 11:52:10 -0700 Message-ID: <MPG.1bcf3039be2eb2f2989686@newsgroups.borland.com> Distribution: world Organization: not really X-Newsreader: MicroPlanet Gravity v2.50 NNTP-Posting-Host: 24.85.71.63 X-Trace: newsgroups.borland.com 1097174903 24.85.71.63 (7 Oct 2004 11:48:23 -0700) Lines: 23 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail