Hello ! i'm working on building an xml file by serializing a dom (generated by my program) in my C++ program. 'nsIDomSerializer' is very interresting because easy to use, but it allows only nsString informations in dom elements. And my question is : to create some dom element, (createElement, create attribute etc...), sometimes i have some nsCAutoString information i must convert in nsString. I tried to convert nsCAutoString in const char * (information.get() --> returns a const char *), then i converted the const char * in PRunichar * ( by casting it like this : (PRUnichar)(information)), and finally i assigned the prunichar * information in an nsString object (toto.Assign(prunichar_information)). The resulting nsString information is probably bad and when i try to serialize the domElement in the xml file, it crashes !!! The charset of my xml file is "UTF8".
I had a look in severals documentations on Mozilla web site, but unfortunately, i didn't find anything about this kind of conversion. If someone knows the best way to convert nsCAutoString in a nsString, it would be very nice. Thanks. -- B�atrice Philippe [EMAIL PROTECTED] _______________________________________________ mozilla-embedding mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-embedding
