From: Stefan M. <ste...@po...> - 2004-11-02 11:09:17
|
Pavel, I think that if you can combine the best of both worlds this must lead = to the best solution. We might not need all the features XMLPartner offers us now but we might = need them later. Implementing it now would be far more easy than when = there's a jungle of code surrounding it. As I am not up-to-date with XML, xsl, xpath and really anything = surrounding XML, I would like to trust you in making the right decision, = as you seem to know a hell of a lot more about it than I. One other thing, I saw in the (xgraph) demo app that you use a = Syntax-highlighter, which one are you using for this? Cheers, Stefan -----Oorspronkelijk bericht----- Van: ext...@li... = [mailto:ext...@li...] Namens Pavel = Vrecion Verzonden: dinsdag 2 november 2004 11:31 Aan: Ext...@li... Onderwerp: [Extgraph-developer] (no subject) I took a look at TurboPower XML Partner which is Pascal implementation = of XML DOM (Document Object Model) and other XML related technologes = like SAX (event based) parser, xpath and xsl processing .... Question is is to switch to it. I would like to summarize pros and cons, but before I must describe = current status a little. In current version XML processing is based on my library which I call = XObjects. Intention of XObjects is to create easy to use XML framework aimed = especially at database and xml processing. From implemntation recommendations from w3c.org it differs in following = areas. Condtradictory to usual DOM it works with fewer objects. Typical = example is XML element and attribute. Usually these are implemented as = different objects, I use only one for both XML node which has type = flag. Advantages of this approach is that there is less to explain, = programmer can work, learn and understand fewer objects and processing = of XML data is more straightforward. For example you need to store incomming XML data into database. = Typically sometimes are data stored in elements and/or attributes. Using = usual DOM implementation you must find if requiered are stored in = element or attribute and then use DOM object accordingly. Using XObjects = you just do not care while both are the same and you work with Node.Name = and Node.Value. Another added value is data type. XML can be typed and XObjects takes = care about typecastings and conersions. You can use for example = Node.AsString, AsNumber, AsBoolean, AsDate .... Sometimes decimal = deilimiter is point, sometimes comma. In datetime types there is jungle. Another valuable trick is that during parsing element names are not = stored in String value, but it is refernce to sorted StringList. It = means that redundant in memory strings are automatically removed, and = taska like finding all element with given name is much faster, while = binary search and direct addressing is used instead of repeated = sequence searches. I compared performace of XObjects and XMLPartner on large xml files (2MB +) and I found expected results. While XObjects parsing time is longer, it consumes less memory. In both cases, memory and time is about 30%.=20 I have also found that TurboPower made DOM extensions very similar to = mine. For example they have option to create Attribute and Element string = lists. I have discussed advantages of XObjects , now I will make commented list = of XML Partner TurboPower solution. - XML Partner has broader support of character encoding, especially they = suport more UTF versions. It seams that there is not sufficient support = of national character sets, which is neither in XObjects, but is in = OpenXML, which is yet another pascal XML DOM implementation. - SAX like event based parser, in XObjects misiing - faster, but more memory consuming, parsing - validation against DTD, good error handling - XPath implementation, feature that is in XObjects in development - buffered streams, this feature enables processing of data larger than = available memory, missing in XObjects - XSLT processing and transformations to HTML, XML, text and RTF, very = good feature that can enhance processing capabalities in the future - very good documentation 500+ pages manual and winhelp, XObjects has = almost none - broader support and probably stability, while XML Partner has been = used longer and in far more installations. This leads me to an idea to use extended XML Partner and switch to it = from XObjects. Features probably can enhanced so, that we can have the = best from both worlds. It would probably also mean to became a = developer of XML Partner to ensure, that new added features will be = present in future releases. _________________________________________________________________________= Uspora az 30 % na POVINNEM RUCENI! Mimoradne ceny pro auta starsi 10 = let! Pojisteni pripojneho vozidla zdarma. 800 100 777 http://adsweb.tiscali.cz/csob.html ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld = Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=CCk _______________________________________________ Extgraph-developer mailing list Ext...@li... https://lists.sourceforge.net/lists/listinfo/extgraph-developer |