Saxon.Api

 

 

Saxon.Api

Class XmlReaderResource


public class XmlReaderResource
implements IResource

An implementation of IResource that contains the ingredients to construct an XDM node, supplied in the form of a DocumentBuilder and an XmlReader representing an XML parser that can be called upon to construct the node when required

Constructor Summary

XmlReaderResource (DocumentBuilder builder, XmlReader parser)

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

 

Property Summary

 string ContentType

The content type, always "application/xml"

 Uri ResourceUri

The resource URI returned is the base URI property set in the XML parser. Note there is no guarantee this will be unique.

 XmlReader XmlReader

The XmlReader (parser), as supplied

 

Method Summary

 XdmItem GetXdmItem ()

Get the item represented by this resource

 

Constructor Detail

XmlReaderResource

public XmlReaderResource(DocumentBuilder builder,
                         XmlReader parser)

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

Parameters:

builder - A document builder, suitably initialized
parser - An XmlReader, suitably initialized

Property Detail

ContentType

public string ContentType {get; }

The content type, always "application/xml"

ResourceUri

public Uri ResourceUri {get; }

The resource URI returned is the base URI property set in the XML parser. Note there is no guarantee this will be unique.

XmlReader

public XmlReader XmlReader {get; }

The XmlReader (parser), as supplied

Method Detail

GetXdmItem

public XdmItem GetXdmItem()

Get the item represented by this resource

Returns:

An XdmNode representing the document node of the document constructed using the document builder and parser.