Re: [xslt] best way to get result as a string?
- From: Daniel Veillard <veillard redhat com>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] best way to get result as a string?
- Date: Tue, 6 Sep 2005 12:55:23 -0400
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
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]