Saxon.Api

 

 

Saxon.Api

Class DomDestination


public class DomDestination
implements IDestination

A DomDestination represents an XmlDocument that is constructed to hold the output of a query or transformation.

No data needs to be supplied to the DomDestination object. The query or transformation populates an XmlDocument, which may then be retrieved as the value of the XmlDocument property.

Constructor Summary

DomDestination ()

Construct a DomDestination.

DomDestination (XmlDocument attachmentPoint)

Construct a DomDestination based on an existing document node.

DomDestination (XmlDocumentFragment attachmentPoint)

Construct a DomDestination based on an existing document fragment node.

DomDestination (XmlElement attachmentPoint)

Construct a DomDestination based on an existing element node.

 

Property Summary

 net.sf.saxon.s9api.Destination UnderlyingDestination

The underlying Destination object in the Saxon implementation

 XmlDocument XmlDocument

After construction, retrieve the constructed document node.

 

Method Summary

 void Close ()

Close any resources associated with this destination. Note that this does not close any user-supplied OutputStream or Writer; those must be closed explicitly by the calling application.

 void OnClose (Action action)

Define an action to be performed when writing to the Destination is complete.

 

Constructor Detail

DomDestination

public DomDestination()

Construct a DomDestination.

With this constructor, the system will create a new DOM Document to act as the destination of the query or transformation results. The document node of the new document may be retrieved via the XmlDocument property.

DomDestination

public DomDestination(XmlDocument attachmentPoint)

Construct a DomDestination based on an existing document node.

The new data will be added as a child of the supplied node.

Parameters:

attachmentPoint - The document node to which new contents will be attached. To ensure that the new document is well-formed, this document node should have no existing children.

DomDestination

public DomDestination(XmlDocumentFragment attachmentPoint)

Construct a DomDestination based on an existing document fragment node.

The new data will be added as a child of the supplied node.

Parameters:

attachmentPoint - The document fragment node to which new contents will be attached. The new contents will be added after any existing children.

DomDestination

public DomDestination(XmlElement attachmentPoint)

Construct a DomDestination based on an existing element node.

The new data will be added as a child of the supplied element node.

Parameters:

attachmentPoint - The element node to which new contents will be attached. The new contents will be added after any existing children.

Property Detail

UnderlyingDestination

public net.sf.saxon.s9api.Destination UnderlyingDestination {get; }

The underlying Destination object in the Saxon implementation

This property provides access to internal methods in the Saxon engine that are not specifically exposed in the .NET API. In general these methods should be considered to be less stable than the classes in the Saxon.Api namespace.

The internal methods follow Java naming conventions rather than .NET conventions.

Information about the returned net.sf.saxon.s9api.Destination object (and the objects it provides access to) is included in the Saxon JavaDoc documentation.

Value:

The underlying Destination object

XmlDocument

public XmlDocument XmlDocument {get; }

After construction, retrieve the constructed document node.

If the zero-argument constructor was used, this will be a newly constructed document node. If the constructor supplied a document node, the same document node will be returned. If the constructor supplied a document fragment node or an element node, this method returns the OwnerDocument property of that node.

Method Detail

Close

public void Close()

Close any resources associated with this destination. Note that this does not close any user-supplied OutputStream or Writer; those must be closed explicitly by the calling application.

OnClose

public void OnClose(Action action)

Define an action to be performed when writing to the Destination is complete.

Parameters:

action - The action to be performed.