次の方法で共有


TransformerFactory.SetFeature(String, Boolean) Method

Definition

Set a feature for this TransformerFactory and Transformers or Templates created by this factory.

[Android.Runtime.Register("setFeature", "(Ljava/lang/String;Z)V", "GetSetFeature_Ljava_lang_String_ZHandler")]
public abstract void SetFeature (string? name, bool value);
[<Android.Runtime.Register("setFeature", "(Ljava/lang/String;Z)V", "GetSetFeature_Ljava_lang_String_ZHandler")>]
abstract member SetFeature : string * bool -> unit

Parameters

name
String

Feature name.

value
Boolean

Is feature state true or false.

Attributes

Exceptions

if this TransformerFactory or the Transformers or Templates it creates cannot support this feature.

If the name parameter is null.

Remarks

Set a feature for this TransformerFactory and Transformers or Templates created by this factory.

Feature names are fully qualified java.net.URIs. Implementations may define their own features. An TransformerConfigurationException is thrown if this TransformerFactory or the Transformers or Templates it creates cannot support the feature. It is possible for an TransformerFactory to expose a feature value but be unable to change its state.

All implementations are required to support the javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING feature. When the feature is:

<ul> <li> true: the implementation will limit XML processing to conform to implementation limits and behave in a secure fashion as defined by the implementation. Examples include resolving user defined style sheets and functions. If XML processing is limited for security reasons, it will be reported via a call to the registered ErrorListener#fatalError(TransformerException exception). See #setErrorListener(ErrorListener listener). </li> <li> false: the implementation will processing XML according to the XML specifications without regard to possible implementation limits. </li> </ul>

Java documentation for javax.xml.transform.TransformerFactory.setFeature(java.lang.String, boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to