|
|
 |
Article:
 |
 |
Non-Extractive Parsing for XML
|
| Subject: |
Wrong approach |
| Date: |
2004-05-28 16:00:36 |
| From: |
Michael Maron |
|
|
|
|
One simple question: why would anybody want to fight with basic ideas of XML in the first place? As far as C++ and especially C are concerned, the answer is obvious: working with XML in C/C++ world is not particularly convenient, so one can look for simpler alternatives to standard parsers - like one considered in this article.
From the other side, regular expressions actually can provide a reasonable alternative to full-scale parsing. Unfortunately, regexps are not common for C/C++ as well, so this is hardly a way out.
But in Perl and in Java regexps are ceratinly very useful for simple XML manipualtions. For example, some XML converters can produce non-valid XML documents which can be transformed to valid ones using Perl or Java regexps.
Another serious alternative to XML DOM and SAX is JDBC in Java.
|
- C++ / .NET
2004-05-29 06:39:35 Michael Maron
[Reply]
Sure, one can use C++ to work with XML - in .NET environment.
Another point is that C++ and even C certainly can be used to generate new XML documents from scratch, for example, by simple sprintf(). As for extraction, no, using string manipulation functions is a really miserable solution.
|
 |
Sponsored By:
|