### Saxon.Api

- BinaryResource
- CatalogCollection
- DirectoryCollection
- DocumentBuilder
- DomDestination
- DynamicContext
- DynamicError
- EmptyEnumerator<T>
- ErrorReporter
- ErrorReporterToStaticError
- ErrorReporterWrapper
- ExtensionFunction
- ExtensionFunctionCall
- ExtensionFunctionDefinition
- Feature<T>
- FeatureKeys
- HostLanguage
- ICollectionFinder
- IErrorReporter
- IInvalidityHandler
- IMessageListener
- IMessageListener2
- InvalidityHandlerWrapper
- IPredicate<in XdmItem>
- IQueryResolver
- IResource
- IResourceCollection
- IResourceFactory
- IResultDocumentHandler
- IXmlLocation
- JarCollection
- NamespaceConstant
- NullDestination
- Predicate<T>
- Predicates
- Processor
- QName
- RawDestination
- RecoveryPolicy
- Resource
- ResourceCollection
- SchemaManager
- SchemaResolver
- SchemaValidationMode
- SchemaValidator
- Serializer
- StandardCollectionFinder
- StandardLogger
- StaticContext
- StaticError
- Step<TInput, TResult>
- Steps
- TextWriterDestination
- TreeModel
- URIQueryParameters
- ValidationFailure
- WhitespacePolicy
- XdmAnyArrayType
- XdmAnyFunctionType
- XdmAnyItemType
- XdmAnyMapType
- XdmAnyNodeType
- XdmArray
- XdmAtomicType
- XdmAtomicValue
- XdmAxis
- XdmDestination
  - - TreeProtector
- XdmEmptySequence
- XdmExternalObjectValue
- XdmFunctionItem
- XdmItem
- XdmItemType
- XdmMap
- XdmNode
- XdmNodeKind
- XdmSequenceType
- XdmValue
- XmlDestination
- XmlProcessingError
- XmlResource
- XPathCompiler
- XPathExecutable
- XPathSelector
- XQueryCompiler
- XQueryEvaluator
- XQueryExecutable
- Xslt30Transformer
- XsltCompiler
- XsltExecutable
  - - ParameterDetails
- XsltPackage
- XsltTransformer

### Saxon.Api

# Class XdmDestination.TreeProtector

Enclosing class
  XdmDestination

public class XdmDestination.TreeProtector
extends net.sf.saxon.event.ProxyReceiver

`TreeProtector` is a filter that ensures that the events reaching the `Builder` constitute a single tree rooted at an element or document node (because anything else will crash the builder)

### Constructor Summary
TreeProtector (net.sf.saxon.event.Receiver next) Constructor

### Method Summary
void | append(net.sf.saxon.om.Item item, net.sf.saxon.s9api.Location location, int copyNamespaces) Append an arbitrary item (node or atomic value) to the output
void | characters(java.lang.CharSequence chars, net.sf.saxon.s9api.Location location, int properties) Character data
void | comment(java.lang.CharSequence chars, net.sf.saxon.s9api.Location location, int properties) Output a comment
void | endDocument() Notify the end of a document node
void | endElement() End of element
void | processingInstruction(string target, java.lang.CharSequence data, net.sf.saxon.s9api.Location location, int properties) Processing instruction
void | startDocument(int properties) Start of a document node
void | startElement(net.sf.saxon.om.NodeName nameCode, net.sf.saxon.type.SchemaType typeCode, net.sf.saxon.om.AttributeMap attributes, net.sf.saxon.om.NamespaceMap namespaces, net.sf.saxon.s9api.Location location, int properties) Notify the start of an element

## Constructor Detail

### TreeProtector

public TreeProtector(net.sf.saxon.event.Receiver next)

Constructor

Parameters:

`next` - Set the underlying receiver

## Method Detail

### append

public override void append(net.sf.saxon.om.Item item,
net.sf.saxon.s9api.Location location,
int copyNamespaces)

Append an arbitrary item (node or atomic value) to the output

Parameters:

`item` - the item to be appended
`location` - the location of the calling instruction, for diagnostics
`copyNamespaces` - if the item is an element node, this indicates whether its namespace need to be copied. 0x80000 means ALL_NAMESPACE, 0x40000 means LOCAL_NAMESPACE and 0 means no namespace

### characters

public override void characters(java.lang.CharSequence chars,
net.sf.saxon.s9api.Location location,
int properties)

Character data

Parameters:

`chars` - Character data as input
`location` - Provides information such as line number and system ID
`properties` - Bit significant value. The following bits are defined

### comment

public override void comment(java.lang.CharSequence chars,
net.sf.saxon.s9api.Location location,
int properties)

Output a comment

Parameters:

`chars` - The content of the comment
`location` - provides information such as line number and system ID
`properties` - Additional information about the comment

### endDocument

public override void endDocument()

Notify the end of a document node

### endElement

public override void endElement()

End of element

### processingInstruction

public override void processingInstruction(string target,
java.lang.CharSequence data,
net.sf.saxon.s9api.Location location,
int properties)

Processing instruction

Parameters:

`target` - The PI name. This must be a legal name (it will not be checked)
`data` - The data portion of the processing instruction
`location` - provides information about the PI
`properties` - Additional information about the PI

### startDocument

public override void startDocument(int properties)

Start of a document node

Parameters:

`properties`

### startElement

public override void startElement(net.sf.saxon.om.NodeName nameCode,
net.sf.saxon.type.SchemaType typeCode,
net.sf.saxon.om.AttributeMap attributes,
net.sf.saxon.om.NamespaceMap namespaces,
net.sf.saxon.s9api.Location location,
int properties)

Notify the start of an element

Parameters:

`nameCode`
`typeCode`
`attributes`
`namespaces`
`location`
`properties`