GtkTextView and libxml2 questions...
- From: Fabricio Rocha <rocha_fabricio yahoo com br>
- To: gtk-app-devel-list gnome org
- Subject: GtkTextView and libxml2 questions...
- Date: Mon, 11 Dec 2006 00:53:10 -0200
Dear friends,
In a given dialog, I would like to have a GtkTextView showing a
brief text extracted from an XML node. This text, in other turn, should
have been created in another GtkTextView (and, sure, saved as content of
an appropriate XML node).
Question 1: I would like to have in this text some formatting, at
least some line breaks. I have read the docs about
gtk_text_buffer_get_text returning a big string (gchar*), but the docs
(and Google) are not clear about *whether* and *how* the line breaks,
tab spaces and such are represented in this big string. Are they set as
C escape sequences, such as '\n', '\t', and such? Or RTF, or Pango, or
something else alike?
Question 2: The xmlsoft.org and Google finds are also/ /*not*
clear about the use of "printf" escaping sequences as content in libxml
nodes. From your experience, do you know if there is any problem in
using them? I normally use libxml functions like xmlNewTextChild and
xmlNodeGetContent, which automatically convert the XML escape/special
characters, with enough precision for my needs; but do you know if
libxml can deal with such things internally?
Question 3: related to the questions above, also from your
experience, how do you read a text from XML and place it on a
GtkTextBuffer, and how do you get text from a GtkTextBuffer and save it
to XML?
Question 4: how do you all deal with this gchar/xmlChar issue
from using libxml with GLib/GTK? This looks weird to me: both GTK and
libxml clearly state that they use UTF-8 encoding internally; but
xmlChar is a "unsigned char" and gchar is just like a normal, signed
"char". I have been placidly ignoring the difference, though I know that
this may cause problems when I start working on the internationalization
of RADiola. What should be The Right Way?
Thank you all and best regards!
Fabricio Rocha
Brasilia, Brasil
http://radiola.sourceforge.net
_______________________________________________________
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora!
http://br.mobile.yahoo.com/mailalertas/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]