XML and logging
[1/2] from: the::optimizer::tiscali::it at: 8-Dec-2003 20:18
Hi all, To all XML and Rebol gurus out there. I have a question about a log file in XML that I want to create. The log has to run for an indefinite long time and to register some events that occur. I thought about making the log format XML, so that it would become quite easy to extract the info and build an HTML report after it. My problems are 2, as I see them: 1. Finding a way to read the XML file once I have created it. I know there's a XML-Parser somewhere but I have not find it anywhere. Is it a commercial product? I would not to use parse or find myself. 2. I'm using the xmlgen.r functions of the library to create the simple XML log file. However these functions work by "emitting" all the content in a single step once it is completely ready. But I cannot do that for obvious reasons. I need to create the document tree basic structure and then adding the single entries once at time when they are ready. So the XML structure would be something like: <DAY> ; signals the start of a new day <DATE>....</DATE> ; the real date <ENTRIES> <ENTRY>...</ENTRY> <ENTRY>...</ENTRY> </ENTRIES> </DAY> where <ENTRY> is a quite complex element itself. This repeated for all days that have at least an entry. So the problem is that I have to create the <DAY></DAY> element while not having all the <ENTRY> at that moment. Which is the easieast way to add them into it? Reading the entire log-file, inserting and re-saving all again? I cannot postpone the ending tags as the log should be kept valid at all times for external programs/scripts that use it (through the XML parser) Thanks in advance. M&F
[2/2] from: antonr:iinet:au at: 10-Dec-2003 15:35
Go to console, type parse- then press TAB twice. Anton.