Boost logo

Boost :

From: Daniel Walker (daniel.j.walker_at_[hidden])
Date: 2006-04-22 15:32:37


On 4/22/06, Joel de Guzman <joel_at_[hidden]> wrote:
> Thorsten Ottosen wrote:
> > Marcin Kalicinski wrote:
>
> >> I was not aware that includes are connected with namespaces. I think my XML
> >> knowledge is not does not stand up to the need. I based my parser on Dan
> >> Nuffer's sources, and hope he got the corner cases right :-) On the other
> >> hand, if boost gets its XML library, my XML parser will be nothing more but
> >> obsolete, so it may not be worthwhile to spend too much time on it at the
> >> moment.
> >
> > There are a number of applications that just needs a simple xml-parser.
> > For example, most of the xml-files in my company are simple recursive
> > structures with a single id="42" attribute here and there. But that id
> > could easily be put into a tag instead.
> >
> > I have not yet understood why xml needs to be so sophisticated, and will
> > probably continue to ignore all those wierd an advanced xml-features.
> >
> > Anyway, Marcin's parser also builds a ptree which is a great benefit
> > compared to the DOM parsers I have seen.
> >
> > Just make sure it is well-defined what subset of xml that can be parsed
> > and what cannot. In spirit of the library, anything that is not really
> > easy and simple to support, should be rejected.
>
> I agree. I have the same observation. Most practical uses of XML
> are actually very simple. I too do not understand why XML needs
> to be so sophisticated.

All the significant projects I know of that use XML tend to use
namespaces and schemas, for example Mozilla, Gnome, OpenOffice.
Namespaces are useful in XML for the same reason their useful in C++:
modularity, which is good if you're dealing with a project maintained
by more than one author with shared components that encode data as
XML. Schemas give you data types and type checking, which obviously is
nice to have when you're dealing with data. I think XML schema
validation is one of the most import features of XML for the same
reason that I like C++ templates and type-safe compile time
polymorphism: making sure your data types are correct before hand
gives you one less thing to worry about.

For anyone interested in becoming convinced of the usefulness of these
XML features I would suggest the tutorials at
http://www.w3schools.com. For a real world example, check out
Mozilla's XML User Interface Language (XUL) at
http://developer.mozilla.org/en/docs/XUL which uses XML to configure
the appearance of application GUIs. Of course there are also tons of
books about this stuff as well.

I don't think this has any repercussions for property_tree other than
to recognize that for the initial release it won't scale beyond
trivial application configurations. That may be fine to begin with,
but at some point Boost users may have higher expectations. We're
spoiled rotten by Boost.Regex and others.

Daniel Walker


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