您将如何将 xmlChar* 转换/转换为 libxml2 库中的 char*?谢谢。
17877 次
2 回答
13
如果您查看示例,例如 io2.c,您会注意到它们只是轻松地将其转换为 char *:
printf("%s", (char *) xmlbuff);
于 2010-02-17T19:05:08.677 回答
6
Looks like it's just unsigned char. So it should be safe to cast as long as you're not doing arithmetic on it.
But, you probably don't need to as that page has the key string functionality implemented in terms of the type.
于 2010-02-17T16:38:34.967 回答