Instance Method インスタンスメソッド

setStringValue:resolvingEntities:

Sets the content of the receiver as a string value and, optionally, resolves character references, predefined entities, and user-defined entities as declared in the associated DTD. レシーバの内容を文字列値として設定しますそして、随意に文字参照、あらかじめ定義されたエンティティ、そしてユーザ定義エンティティをその結びつけられたDTDにおいて宣言されるとおりに解決します。

Declaration 宣言

- (void)setStringValue:(NSString *)string 
     resolvingEntities:(BOOL)resolve;

Parameters パラメータ

string

A string to assign as the value of the receiver. レシーバの値として割り当てることになる文字列。

resolve

YES to resolve character references, predefined entities, and user-defined entities as declared in the associated DTD; NO otherwise. Namespace and processing-instruction nodes have their entities resolved even if resolve is NO. 結びつけられたDTDにおいて宣言されるとおりに文字参照、あらかじめ定義されたエンティティ、そしてユーザ定義エンティティに解決するにはYES;そうでなければNO。名前空間と処理命令ノードは、解決されたそれらのエンティティを持ちます、たとえresolveNOだとしてもです。

Discussion 議論

User-defined entities not declared in the DTD remain in their unresolved form. This method can only be invoked on NSXMLNode objects that may have content, specifically elements, attributes, namespaces, processing instructions, text, and DTD-declaration nodes. Setting the string value of a node object removes all existing children, including processing instructions and comments. Setting the string value of an element -node object creates a text node as the sole child. DTDにおいて宣言されないユーザ定義エンティティは、それらの未解決形式のままです。このメソッドは、NSXMLNodeオブジェクト上で発動されるだけです、それは内容を持つかもしれません、具体的には要素、属性、名前空間、処理命令、テキスト、そしてDTD宣言ノード。ノードオブジェクトの文字列値を設定することは、全ての既存の子を取り除きます、処理命令とコメントを含めて。要素ノードオブジェクトの文字列値を設定することは、テキストノードは一人っ子として作成されます。

See Also 参照

Managing XML Node Objects XMLノードオブジェクトを管理する