## edu.stanford.nlp.process
Class TransformXML.SAXInterface<T>

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          edu.stanford.nlp.process.TransformXML.SAXInterface<T>

All Implemented Interfaces:
  ContentHandler, DTDHandler, EntityResolver, ErrorHandler

Enclosing class:
  TransformXML<T>

    public static class TransformXML.SAXInterface<T>

extends DefaultHandler

Field Summary
`protected int` `depth` How far down we are in the nested tags.
`protected List<String>` `elementsToBeTransformed`
`protected Function<String,T>` `function`
`protected PrintWriter` `outWriter`
`protected StringBuffer` `textToBeTransformed`

Constructor Summary
`TransformXML.SAXInterface()`

Method Summary
`void` `characters(char[] buf, int offset, int len)`
`void` `endDocument()`
`void` `endElement(String uri, String localName, String qName)`
`void` `startElement(String uri, String localName, String qName, Attributes attributes)`

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### elementsToBeTransformed

    protected List<String> elementsToBeTransformed

### textToBeTransformed

    protected StringBuffer textToBeTransformed

### outWriter

    protected PrintWriter outWriter

### function

    protected Function<String,T> function

### depth

    protected int depth

  How far down we are in the nested tags. For example, if we've seen <foo> <bar> and "foo" and "bar" are both tags we care about, then depth = 2.

Constructor Detail

### TransformXML.SAXInterface

    public TransformXML.SAXInterface()

Method Detail

### endDocument

    public void endDocument()

  Specified by:
    `endDocument` in interface `ContentHandler`
  Overrides:
    `endDocument` in class `DefaultHandler`

### startElement

    public void startElement(String uri,
                             String localName,
                             String qName,
                             Attributes attributes)
                      throws SAXException

  Specified by:
    `startElement` in interface `ContentHandler`
  Overrides:
    `startElement` in class `DefaultHandler`
  Throws:
    `SAXException`

### endElement

    public void endElement(String uri,
                           String localName,
                           String qName)
                    throws SAXException

  Specified by:
    `endElement` in interface `ContentHandler`
  Overrides:
    `endElement` in class `DefaultHandler`
  Throws:
    `SAXException`

### characters

    public void characters(char[] buf,
                           int offset,
                           int len)
                    throws SAXException

  Specified by:
    `characters` in interface `ContentHandler`
  Overrides:
    `characters` in class `DefaultHandler`
  Throws:
    `SAXException`

Stanford NLP Group