OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: nestable C/C++ XML parser?

[ Lists Home | Date Index | Thread Index ]
  • From: Lars Marius Garshol <larsga@garshol.priv.no>
  • To: xml-dev <xml-dev@ic.ac.uk>
  • Date: 07 Dec 1999 18:11:08 +0100


* Paul Miller
|
| In other words, I'd like to start parsing, then branch to a function
| to handle a specific element, parsing in there until that element is
| closed, then fall back out of the function to continue parsing the
| rest of the document.

More people than you have been asking for this, but this is quite
simply not the way XML is meant to work. XML is a standardized syntax,
and because of that it makes no sense to let application developers do
part of the parsing, since they are likely to get parts of it wrong
and since the syntax is standardized there is no reason not to let the
parser handle it for you. (You would in any case only duplicate its
standard-decreed way of parsing.)

The only application I see for this sort of thing is to be able to
work around XML syntax rules, but once you do that your document is no
longer an XML document and you shouldn't pretend that it is, not even
to yourself. (Imagine what happens when an XML repository, XML editor,
XML browser or an XSLT engine tries to work with your "XML" document.)

In other words, when you find yourself doing this you should very
likely explain why to experienced XML developers and then ask them how
one usually handles this sort of thing _within_ XML, or else abandon
any pretense of using XML entirely.

--Lars M.


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS