# TransformerHandler

public interface **TransformerHandler** implements [ContentHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html) [LexicalHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html) [DTDHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/DTDHandler.html) A TransformerHandler
listens for SAX ContentHandler parse events and transforms
them to a Result.

### Public Method Summary

|---|---|
| abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getSystemId](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/sax/TransformerHandler.html#getSystemId())() Get the base ID (URI or system ID) from where relative URLs will be resolved. |
| abstract [Transformer](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Transformer.html) | [getTransformer](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/sax/TransformerHandler.html#getTransformer())() Get the `Transformer` associated with this handler, which is needed in order to set parameters and output properties. |
| abstract void | [setResult](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/sax/TransformerHandler.html#setResult(javax.xml.transform.Result))([Result](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Result.html) result) Set the `Result` associated with this `TransformerHandler` to be used for the transformation. |
| abstract void | [setSystemId](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/sax/TransformerHandler.html#setSystemId(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemID) Set the base ID (URI or system ID) from where relative URLs will be resolved. |

### Inherited Method Summary

From interface [org.xml.sax.ContentHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html)

|---|---|
| abstract void | [characters](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#characters(char[],%20int,%20int))(char\[\] ch, int start, int length) Receive notification of character data. |
| abstract void | [endDocument](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#endDocument())() Receive notification of the end of a document. |
| abstract void | [endElement](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#endElement(java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) uri, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) localName, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) qName) Receive notification of the end of an element. |
| abstract void | [endPrefixMapping](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#endPrefixMapping(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) prefix) End the scope of a prefix-URI mapping. |
| abstract void | [ignorableWhitespace](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#ignorableWhitespace(char[],%20int,%20int))(char\[\] ch, int start, int length) Receive notification of ignorable whitespace in element content. |
| abstract void | [processingInstruction](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#processingInstruction(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) target, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) data) Receive notification of a processing instruction. |
| abstract void | [setDocumentLocator](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#setDocumentLocator(org.xml.sax.Locator))([Locator](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Locator.html) locator) Receive an object for locating the origin of SAX document events. |
| abstract void | [skippedEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#skippedEntity(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name) Receive notification of a skipped entity. |
| abstract void | [startDocument](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#startDocument())() Receive notification of the beginning of a document. |
| abstract void | [startElement](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) uri, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) localName, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) qName, [Attributes](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Attributes.html) atts) Receive notification of the beginning of an element. |
| abstract void | [startPrefixMapping](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#startPrefixMapping(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) prefix, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) uri) Begin the scope of a prefix-URI Namespace mapping. |

From interface [org.xml.sax.ext.LexicalHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html)

|---|---|
| abstract void | [comment](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#comment(char[],%20int,%20int))(char\[\] ch, int start, int length) Report an XML comment anywhere in the document. |
| abstract void | [endCDATA](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#endCDATA())() Report the end of a CDATA section. |
| abstract void | [endDTD](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#endDTD())() Report the end of DTD declarations. |
| abstract void | [endEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#endEntity(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name) Report the end of an entity. |
| abstract void | [startCDATA](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#startCDATA())() Report the start of a CDATA section. |
| abstract void | [startDTD](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#startDTD(java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Report the start of DTD declarations, if any. |
| abstract void | [startEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#startEntity(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name) Report the beginning of some internal and external XML entities. |

From interface [org.xml.sax.DTDHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/DTDHandler.html)

|---|---|
| abstract void | [notationDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/DTDHandler.html#notationDecl(java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Receive notification of a notation declaration event. |
| abstract void | [unparsedEntityDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/DTDHandler.html#unparsedEntityDecl(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) notationName) Receive notification of an unparsed entity declaration event. |

## Public Methods

#### public abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**getSystemId**
()

Get the base ID (URI or system ID) from where relative
URLs will be resolved.

##### Returns

- The systemID that was set with `https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/sax/TransformerHandler.html#setSystemId(java.lang.String)`.

#### public abstract [Transformer](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Transformer.html)
**getTransformer**
()

<br />

Get the `Transformer` associated with this handler, which
is needed in order to set parameters and output properties.

<br />

##### Returns

- `Transformer` associated with this `TransformerHandler`.

#### public abstract void
**setResult**
([Result](https://developers.google.com/j2objc/javadoc/jre/reference/javax/xml/transform/Result.html) result)

<br />

Set the `Result` associated with this
`TransformerHandler` to be used for the transformation.

<br />

##### Parameters

| result | A `Result` instance, should not be `null`. |
|---|---|

##### Throws

| [IllegalArgumentException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IllegalArgumentException.html) | if result is invalid for some reason. |
|---|---|

#### public abstract void
**setSystemId**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemID)

Set the base ID (URI or system ID) from where relative
URLs will be resolved.

##### Parameters

| systemID | Base URI for the source tree. |
|---|---|