简体   繁体   中英

LibXML2 xmlGetProp() - No matching function

Hi I'm running libxml2 in XCode 4.5 and having problems with the xmlGetProp() function. XCode says there's no matching function for the call.

I've already added ${SDK_DIR}/usr/include/libxml2 to my Header Search Path and added libxml2.dylib in Link Binary With Libaries.

Please any help?

Make sure the second parameter is cast to const xmlChar *

ala

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

and the "uri" should be a "xmlChar *"???!!!

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

to use this:

xmlFree(uri);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM