Saxon.Api

 

 

Saxon.Api

Class NodeResource


public class NodeResource
implements IResource

An implementation of IResource that represents an XDM node, simply by wrapping an existing XdmNode object

Constructor Summary

NodeResource (XdmNode node)

Create a NodeResource whose content is supplied as an existing XDM node

 

Property Summary

 string ContentType

The content type of the resource: for a NodeResource this is "application/xml".

 Uri ResourceUri

The ResourceUri of a NodeResource is the document URI of the node, if it exists

 

Method Summary

 XdmItem GetXdmItem ()

Get the item representing the value of the resource

 

Constructor Detail

NodeResource

public NodeResource(XdmNode node)

Create a NodeResource whose content is supplied as an existing XDM node

Parameters:

node - The XDM node

Property Detail

ContentType

public string ContentType {get; }

The content type of the resource: for a NodeResource this is "application/xml".

ResourceUri

public Uri ResourceUri {get; }

The ResourceUri of a NodeResource is the document URI of the node, if it exists

For many nodes, (including all non-document nodes) the ResourceUri will be null.

Method Detail

GetXdmItem

public XdmItem GetXdmItem()

Get the item representing the value of the resource

Returns:

The contained XDM node