[Home] [By Thread] [By Date] [Recent Entries]
Use parsed external entities. The document never changes and reads <log> &data; </log> The data file contains the records: <entry>...</entry> <entry>...</entry> <entry>...</entry> <entry>...</entry> and you can append to it any time you like. This is about the only time I ever use external entities. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Alan Gutierrez [mailto:alan-xml-dev@e...] > Sent: 18 January 2005 07:57 > To: xml-dev@l... > Subject: Appending XML to File > > I was wondering if anyone had used XML in a logging context. > > Have you wanted to append XML to file, or store XML events to > file? How did you do this and manage to keep the document well > formed? > > 1. Create a directory structure contianing a document for each > event. > > 2. Create a file that contains one document after another, each > representing an event.. > > 3. Seek to the start of the last element, overwrite with > event and new element. > > Option 1 sounds unwieldy, option 2 creates a peculiar file, and > option 3 sounds fragile. > > Insight is much appreciated. > > -- > Alan Gutierrez - alan@e... > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an > initiative of OASIS <http://www.oasis-open.org> > > The list archives are at http://lists.xml.org/archives/xml-dev/ > > To subscribe or unsubscribe from this list use the subscription > manager: <http://www.oasis-open.org/mlmanage/index.php> > >
|

Cart



