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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: SAX C/C++ Implementations?

[ Lists Home | Date Index | Thread Index ]
  • From: Steinar Bang <sb@metis.no>
  • To: xml-dev@ic.ac.uk
  • Date: 28 Sep 1999 12:44:49 +0200

>>>>> Holger Flörke <hf@daisybytes.su.uunet.de>:

> At 11:08 24.09.99 -0400, you wrote:
>> I occasionally receive e-mail about people who've attempted SAX
>> implementations in C or C++.  I know about IBM's and a couple of
>> private ones, but I'd like to try to smoke out any others that might
>> be lurking.  Please reply if you have one.

> Based upon Expat I recently started working on a C++ implementation
> of SAX.  Currently only the basic things (as DocumentHandler,
> Parser, Locator and SAXExcpetion) are designed, implemented and
> *seem* to work well.

> I hope there will be a standardized C++ interface in the
> future. Feel free to contact for more information.

After looking at 
        http://www.jezuk.demon.co.uk/SAX/
and
        http://www.cgocable.net/~mlepage/minion/doc/
I wrote my own implementation, which like the one above and the two in 
the URLs also includes an expat wrapper.

It's not for me to make the code public, but if anybody are
interested, I can ask my employer if I'm allowed to.

Since I had to make this work on some parsers without proper namespace
support I prefixed the classes with "sax_".

Like Jez Higgins I'm returning "const string&" in the attribute list,
rather than the "const string*" of the Minion SAX implementation.  If
I'm accessing a non-existing attribute the returned value is a
reference to an empty string.

Wrt. to the issues raised in
        http://www.cgocable.net/~mlepage/minion/doc/class_nand__xml__sax__parser.html#_details
I'm also using the iostream classes instead of the iowstream classes,
and string instead of wstring (issues 2, 3, and 4).

This is because I don't have iowstream and not full std::iostream
compliance on any of the platforms I'm working on, and our program is
currently using string internally.

Right now I'm decoding UTF-8 into ISO-8859-1 and throwing away
everything that doesn't fit.  This is not a long term strategy, but
for now it'll do.


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 (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe 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