Hi Hannu, I did look for the information as well and did find it in 1 min: http://www.xmlsoft.org/tutorial/ar01s02.html http://xmlsoft.org/html/libxml-tree.html#XMLCHAR probably before casting one type to the other like is done in this code thrice: ....... if (titolo != NULL) { char* tit = ap_pstrdup(r->pool, (char*) xmlEncodeEntitiesReentrant(doc, (xmlChar*) titolo)); xmlNewChild(node, NULL, (xmlChar*) "Title", (xmlChar*) tit); } ........ it won't be too much to look its definition up, is it? (the 2nd resource is derived from the source code) but probably you are right, that this should surely be in the faqs! I attached a patch, but maybe it should say more? Cheers, Marcus
-----Original Message----- From: Hannu Krosing [mailto:hannu tm ee] Sent: Wednesday, October 30, 2002 1:20 PM To: veillard redhat com Cc: Peter Jacobi; xml gnome org Subject: Re: [xml] (no subject) Daniel Veillard kirjutas K, 30.10.2002 kell 15:54:On Wed, Oct 30, 2002 at 02:42:20PM +0100, Peter Jacobi wrote:Hi Daniel,I am doomed to answer on my free time to users whojust don't wantto spend the time to read the documentation ???Perhaps the "welcome" message to the mailing list shouldcontain the UTF-8answer?Honnestly, I don't know how to get people to behave in a less egoist fashion. Everybody wants its question answered now and without having the hassles of looking for the answers or reading what's available. I'm afraid of having valuable contributors be burnt out by this, I'm afraid of getting burnt out myself. Should I hide the address of the list (or make it available only at the end of a search query answer) ? I honnestly don't know what to do.Perhaps adding everything that is asked more than once to FAQ would help ? Q: I have an XML document and I add some nodes with text in iso-8859-1 encoding, but I get en error when trying to save this document using iso-8859-1 encoding. A: All internal text is kept in utf-8 encoding, sou you have to convert your text to utf-8 befor adding it to DOM tree. It will be then converted to whatever format you want when you save it.The two mail received today were both complete FAQ,I just checked, and the FAQ at www.xmlsoft.org did _not_ have an answer for the iso-8859-1 question - a search for "UTF" gave nothing and search for "encoding" gave irrelevant answer (about iconv support). It was quite quite hard to find out the answer even after going to "Encoding support" doc.covered in the recent weeks, the XPath question is actually simply due to the fact that people don't even try to understand the XPath specification because libxml2 behaviour directly derives from the spec normative text. That's simply depressing :-(Spec's normative texts are usually not an easy read ;( One will only _really_ understand them when one has to implement them, for all other purposes just trying and guessing and asking around is usually the faster way. (just another thing to get depressed about ;) --------------- Hannu _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml gnome org http://mail.gnome.org/mailman/listinfo/xml
Attachment:
faq.diff
Description: Binary data