From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7b97e385047500eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Marc A. Criley" Newsgroups: comp.lang.ada Subject: Re: Experiences of XML parser generators for Ada? Date: Mon, 6 Dec 2004 08:48:53 -0600 Message-ID: <31j9qpF3ask1jU1@individual.net> References: <41af8365@news.wineasy.se> <2426353.SD16GYvm6f@linux1.krischik.com> <41b02dfe$0$25046$ba620e4c@news.skynet.be> <41b0cfc3$1@news.wineasy.se> <41b0f749$0$25068$ba620e4c@news.skynet.be> X-Trace: individual.net FiTsqwoLXm1mH7klJMuEmA7hC11TLm06I4dnItAJmxjK/jtfH+ X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Xref: g2news1.google.com comp.lang.ada:6801 Date: 2004-12-06T08:48:53-06:00 List-Id: "Adrien Plisson" wrote : > so here comes my advice: think twice before using xml. > xml is a very powerful tool for DYNAMICALLY STRUCTURED HUMAN READABLE > TEXT. Like any other technology, XML is well-suited to a certain class of problem domains and not so well suited to others. I agree that XML was an inappropriate choice for the purpose to which you were applying it--internal data transfer between two tightly coupled subsytems. The reason for XML's existence is quite public: data interoperability between loosely coupled systems. The human readability of XML is handy, but basically irrelevant to its intended purpose. As a real-world example, one of the tools we've developed at my day job generates a report of events extracted from log files and correlated with the expected sequence of events. I directed that the report be generated using XML, which made it easier to convert to HTML for viewing in a browser, and to ease the creation of possible follow-on tools that might find the information in that report to be useful as input. Guess what? This has just happened. A new tool is now being created will use the generated report as input, since the correlated, logged events can serve as triggers as to when to perform additional post-processing of the data logged by the system. Because the report is represented in XML, no parser needed to be written and no interpretation of the contents needed to be implemented, it was all there in the XML schema and files. Other than us developers, no one will ever need to look at the raw XML form of the report, but because of the interoperability infrastructure we have with XML, writing and parsing data files comprises only a very small part of the overall development effort. > for everything else, a basic binary protocol with some well > defined rules to follow (endianness, size of data) will really be more > efficient. plus, a basic binary protocol do not need complicated parsers... Assuming of course that over time the documentation of the binary format remains up-to-date and locatable! At least with a halfway-reasonable XML definition you can infer something about the content's layout and structure just by looking at the file. (And XML parsers are readily available, so their complexity is of little concern to me.) On-topic Ada reference :-) -- XIA (XPath In Ada) is coming along nicely. The next version, 0.30, which includes a partial implementation of predicate filtering, will be made available in the very near future. (www.mckae.com/xia.html) Marc A. Criley McKae Technologies www.mckae.com