iPhone アプリで xml ドキュメントを読み込んで解析しようとしています。解析を開始してから、オーバーライド メソッドを使用します。
static void startElementSAX(void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI,
int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int nb_defaulted, const xmlChar **attributes)
次に、属性を次のように文字列に変換しようとします。
NSString *str1 = [[NSString alloc] initWithCString:attributes encoding:NSUTF8StringEncoding];
attributes パラメータの前に ** が 2 つ付いているのはなぜですか。上記のコードでデータを抽出して文字列に変換しようとすると、次の警告が表示されるのはなぜですか。
'initWithCString:encoding:' の引数 1 を互換性のないポインター型から渡しています。