actually i implemented the component in both cpp and js .. and i would
prefer to use js, however I ran into a problem with the js
version ...I have this XML file sitting on the local filesystem in an
arbitrary folder, say c:\foo\settings.xml .. and the js component
could not load this .. so for example:
xmlDoc.load('c:\foo\settings.xml') would throw an error, but if I
moved the xml file alongside the javascript component code, and tried
this:
xmlDoc.load('settings.xml') it would work fine.
Well moving that XML file into my xpcom extension folder under the
firefox user profile is not an option. So I thought I would have more
flexibility if I did this in cpp.... hence the alternate cpp xpcom
experiment...

re: examples - I was wanting to see how to build the stuff, more than
anything else... mac-intel .. mac-ppc ... oh and in the case of the
cpp dll, I take it we don't need a DllMain on Mac? Or do we..?

thanks for the info! I'll go check out that nsISAXXMLParser
interface...



On Sep 3, 5:59 am, Benjamin Smedberg <[EMAIL PROTECTED]> wrote:
> mlabs wrote:
> > i've written a c++ xpcom component for firefox (windows). It needs to
> > open up an XML file locally and do some stuff with it. I want the
> > component to run on windows and Mac OSX.
>
> > Q: does anyone know of a decent c++ XML library that will compile on
> > both windows and Mac OSX?
>
> mozilla has the expat XML parser built in. You can access it through the
> nsISAXXMLParser interface [1]. You can also just use XMLHttpRequest and DOM
> from script as request.responseXML [2].
>
> So I recommend writing your component in JS instead of C++ unless there are
> other requirements you haven't mentioned.
>
> > Q: does anyone know of any good examples of c++ xpcom on Mac OSX?
>
> Most of the Mozilla codebase is an example, since it is cross-platform code.
> What in particular do you want to know?
>
> --BDS
>
> 1.http://developer.mozilla.org/en/docs/SAX
> 2.http://developer.mozilla.org/en/docs/XMLHttpRequest#responseXML


_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to