Re: Reading XML stream using unmanaged c++
- From: Daniel James <wastebasket@xxxxxxxxxxxxxxxx>
- Date: Wed, 22 Nov 2006 11:18:32 GMT
In article news:<1q57m2h0r1h8nimk684rqu8e6ctql9pbk6@xxxxxxx>, Joseph M. Newcomer
wrote:
You seem to be saying that DOM would be better if it didn't provide a back****
pointer? Wouldn't that just make it useless for tree structures as well as for
your linear ones?
How so? You don't need a back pointer to implement tree structures. We've
been building tree structures for decades without back pointers to the parent!
We taught this to beginning students in 1967. So it is not needed.
That's true, but a back pointer is a handy thing to have when using a DOM node. If
DOM didn't provide a back pointer I expect every piece of code that traversed a
DOM tree would end up building and managing back pointers of its own.
The back pointer isn't a weakness of DOM. The tree-centric nature of DOM may be a
weakness, but once you accept that DOM is tree-centric the back-pointer is just a
convenience.
I'm not responsible for lack of imagination in the user community.
No, indeed!
XLink very definitely talks about complex linked structures as an intrinsic
part of XML.
I confess I was only peripherally aware of xlink. It certainly seems to be
performing the sort of cross-linking of nodes that you've been talking about here
... but is it *part of* XML, or is it a new language built *using* XML? The
references I've scanned so far suggest the latter, but I'd need to read some (a
lot) more about it to be able to say of sure.
Sorry, XML is entirely metadata.
XML is metadata, but an XML document is an XML metadata structure with actual data
woven into it. If there were no data (as opposed to metadata) XML would be a very
great deal less useful.
[snip]I still don't understand why you're giving DOM such a hard time, though.
Because a widely-used tool should not impose artificial restrictions on the
XML structure.
I don't think DOM would be widely-used if it weren't a useful tool. I can see that
it doesn't model the structure of the data in your application, but I don't think
it was ever intended to.
It might be nice if DOM could be extended by an application to allow it to process
metadata other than the basic XML (tree) structure -- and if that were possible I
would agree that the back-pointer should not be part of the basic tool (but that
applications should be free to add it in an extension if that made sense for their
model). However, that's not what DOM does. DOM does trees, and 95% of XML does
trees too, so that looks like quite a good fit -- to me, at least.
I'm going to stop there, because I think this discussion -- interesting though it
is -- has probably outstayed it's welcome in public.vc.mfc.
I still think you're unreasonable in blaming DOM for not being something that it
was never intended to be -- but I've made that point and can't see how I can say
anything much more; I accept that you disagree.
Thank you for opening my eyes to the fact that there *are* people out there who
really are using XML for something other than tree-shaped data. XML still doesn't
seem quite like a natural choice for that, to me, but I'll certainly consider it
further.
Cheers,
Daniel.
.
- References:
- Reading XML stream using unmanaged c++
- From: Mayur
- Re: Reading XML stream using unmanaged c++
- From: Joseph M . Newcomer
- Re: Reading XML stream using unmanaged c++
- From: David Ching
- Re: Reading XML stream using unmanaged c++
- From: Joseph M . Newcomer
- Re: Reading XML stream using unmanaged c++
- From: Daniel James
- Re: Reading XML stream using unmanaged c++
- From: Joseph M . Newcomer
- Re: Reading XML stream using unmanaged c++
- From: Daniel James
- Re: Reading XML stream using unmanaged c++
- From: Joseph M . Newcomer
- Re: Reading XML stream using unmanaged c++
- From: Daniel James
- Re: Reading XML stream using unmanaged c++
- From: Joseph M . Newcomer
- Re: Reading XML stream using unmanaged c++
- From: Daniel James
- Re: Reading XML stream using unmanaged c++
- From: Joseph M . Newcomer
- Reading XML stream using unmanaged c++
- Prev by Date: Re: IDC_STATIC / 65535 ?
- Next by Date: Re: ClipCursor trouble
- Previous by thread: Re: Reading XML stream using unmanaged c++
- Next by thread: Re: Reading XML stream using unmanaged c++
- Index(es):
Relevant Pages
|