Re: [xslt] best way to get result as a string?



Daniel,

Thanks for the quick response. That did it. No more warnings :)

Marc

On Sep 6, 2005, at 12:55 PM, Daniel Veillard wrote:

On Tue, Sep 06, 2005 at 12:47:25PM -0400, Marc Respass wrote:

warning if the default is unsigned. Maybe there is a different
function I could call to get the transformation result as a const
char *? I didn't see anything in the libxml docs.


It is in the FAQ !

http://xmlsoft.org/FAQ.html#Developer
"So what is this funky "xmlChar" used all the time?"
"It is a null terminated sequence of utf-8 characters. And only
utf-8! You need to convert strings encoded in different ways to utf-8
before passing them to the API. This can be accomplished with the
iconv library for instance."


The C language char * has no notion of encoding (or the locale one which
is improper for XML processing), hence the xmlChar *.
If your API takes UTF-8 encoded strings as input a simple cast is fine.


Daniel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]