Re: [xml] Error in the Tutorial
- From: Igor Zlatkovic <igor zlatkovic com>
- To: Michael Masson <m masson t-online de>
- Cc: xml gnome org
- Subject: Re: [xml] Error in the Tutorial
- Date: Thu, 27 May 2004 12:28:56 +0200
On 25.05.2004 21:14, Michael Masson wrote:
Hallo
At the Tutorial for libxml2 is a error in the source code. The error is in
the XPath example on Line 35. See the compiler message
xpath_example.c: In function `int main(int, char**)':
xpath_example.c:35: error: invalid conversion from `const char*' to `xmlChar*
the line lock
xmlChar *xpath = ("//keyword");
but it must lock
xmlChar *xpath = xmlCharStrdup("//keyword");
That call allocates memory. Where do you intend to place the
corresponding call to xmlFree?
Ciao,
Igor
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]