LibXML2 xmlGetProp() - 无匹配函数

LibXML2 xmlGetProp() - No matching function

本文关键字:无匹配 函数 xmlGetProp LibXML2      更新时间:2023-10-16

嗨,我在XCode 4.5中运行libxml2,并且xmlGetProp()函数出现问题。XCode表示调用没有匹配功能。

我已经将${SDK_DIR}/usr/include/libxml2添加到我的标头搜索路径中,并在带有库的链接二进制中添加了libxml2.dylib。

请帮忙吗?

确保第二个参数转换为 const xmlChar *

uri = xmlGetProp(cur, (const xmlChar *)"PV");

uri 应该是xmlChar *

uri = xmlGetProp(cur, (const xmlChar *)"PV");

为了允许像这样使用它:

xmlFree(uri);