[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML structure. Need advice...
Jaepil Kim wrote: > > I m trying to build a word processor like Windows application. > > One of the main features of this application is AutoSave. In hope of > reducing the time taken for the AutoSave, i was planning to save only > the modified sections. > > So I structured my XML files like below. > > //---------------------------------------------- > > Page01.xml > <page id=”3464” modified_date=”2004/04/01”> > <block id=”213”> > <p>P4567.xml</p> > <p>P2345.xml</p> > <p>P6734.xml</p> > </block> > <block id=”156”> > <p>P4567.xml</p> > <p>P2345.xml</p> > <p>P6734.xml</p> > </block> > </page> > //---------------------------------------------- > I think it would be a huge mistake to structure files based on pages. That is because the page a bit of text is on depends greatly on the styling, margins, line break algorithm, etc. Any change would be devastating. You may want something like a change log or transaction file. You would record all changes, as you might do for Undo capability. Every so often, the changes could be merged back into the main file, much as is done in database practice. As for parsing, I suggest searching for Rick Jeliffe's paper on the markup language and parser used for the Topologi editor. That might be a good starting point. Cheers, Tom P |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|