Saxon.Api

 

 

Saxon.Api

Class LinqDestination


public class LinqDestination
implements IDestination

A LinqDestination represents a LINQ-for-XML XDocument that is constructed to hold the output of a query or transformation.

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

Constructor Summary

LinqDestination ()

Construct a LinqDestination.

LinqDestination (XDocument doc)

Construct a LinqDestination using a supplied document.

 

Property Summary

 net.sf.saxon.s9api.Destination UnderlyingDestination

The underlying Destination object in the Saxon implementation

 XDocument XDocument

After construction, retrieve the newly 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

LinqDestination

public LinqDestination()

Construct a LinqDestination.

With this constructor, the system will create a new LINQ XDocument 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.

LinqDestination

public LinqDestination(XDocument doc)

Construct a LinqDestination using a supplied document.

With this constructor, the system will add the results of the query or transformation to the supplied (skeletal) XDocument.

Parameters:

doc - A document

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

XDocument

public XDocument XDocument {get; }

After construction, retrieve the newly constructed document 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.