macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

elementWithName:children:attributes:

エレメント名、子エレメント、アトリビュートでノードを作って返します
+(id)elementWithName:(NSString *)name:
             children:(NSArray *)children:
             attributes:(NSArray *)attributes:

解説

エレメント名、子エレメント、アトリビュートでノードを作って返します。

返り値

( id )

オブジェクト()

引数

( NSString * )name

エレメント名

( NSArray * )children

子エレメント

( NSArray * )attributes

クラス

NSXMLNode

Class Methods

使用可能

10.4

参照

例文

NSArray *channelAttribute = [NSArray arrayWithObjects:
		[NSXMLNode attributeWithName:@"rdf:about" stringValue:@"http://www.oomori.com/"],
		nil];
	NSXMLElement *channel = 
		(NSXMLElement *)[NSXMLNode elementWithName:@"channel" children:[NSArray array] attributes:channelAttribute];