Boost logo

Boost :

From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2007-03-01 17:46:18


Robert Ramey wrote:
> Stefan Seefeld wrote:
>
>> I think you (still) totally miss the point. Sorry.
>
> LOL - I guess so. The first message in the thread asks the question:
>
>> I would like to know,
>> if any library for parsing XML file is available in boost or not.
>> I srearched in the boost.org site for the same but,
>> I cound't get any library as such.
>
> which is the question I've addressed. I.m not sure what else
> we're referring to here.

Well, we debated how to fill that gap, i.e. in particular, what exactly
needs to be added to boost. I pointed out that I had already submitted
an API (implemented in terms of libxml2), while you suggested that
using spirit with some formal XML grammar might be a good starting point.

>> That is also the appeal of "Let's reinvent it !". There are XML
>> parsers out there that support all the above. Why not use them ?
>
> Perhaps that's a good question to the original poster.

I don't think so, as the quest for a boost.xml API is still valid IMO.
There is no standardized way to handle with XML input in C++.
The point I'm trying to make here is that proposing a C++ API for and
suggesting to (re-)implement XML handling are two quite different things.

>> What features of XML are you using ? External subsets or any other
>> URLs that need to be looked up ? XInclude support to make documents
>> modular ? Etc., etc.
>
> How are these questions related to parsing XML syntax?

Think of C++. What does it take to 'parse C++ syntax' ? Quite a lot,
as it turns out. Quite a bit of semantic analysis, to disambiguate
the syntax.

Now, XML grammar is (fortunately) much simpler, however I have never
come across the need to only 'parse XML syntax' without doing that extra
work required to do the rest. What do you expect an XML parser to return ?
The XML spec has quite a clear definition of that
(http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#intro)

That's what Boris was referring to as a 'conforming XML parser'. Anything
non-conformant shouldn't be called an 'XML parser'. There already is way
too much non-conformance in the wild.

Regards,
                Stefan

-- 
      ...ich hab' noch einen Koffer in Berlin...

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk