Saxon.Api
Interface IResource
- All Known Implementing Classes
- NodeResource, TextResource, XmlReaderResource
-
public interface IResource
This interface defines a Resource, which might be an external XML file, text file, JSON file, etc. Resources might belong to a collection, or might be accessed individually by URI.
It is recommended (but is not universally the case) that fetching (and where necessary
parsing)
the content of an IResource
should be delayed until the GetXdmItem
method is called. This means
that errors in fetching the resource or parsing its contents may go undetected until
the resource
is materialized in this way.
For deterministic behavior and conformance with W3C Recommendations, it is strongly
recommended
that repeated calls on GetXdmItem
should deliver the same result (if the result is a node,
it should be the same node each time). This can be achieved by caching the result.
However, this
can be expensive in use of memory, and Saxon does not attempt to enforce this rule.
Property Summary |
|
---|---|
string | ContentType The media type (MIME type) of the resource if known (otherwise null) |
Uri | ResourceUri A URI that identifies this resource |
Method Summary |
|
---|---|
XdmItem | GetXdmItem () Get an XDM Item holding the contents of this resource. |
Property Detail
ContentType
The media type (MIME type) of the resource if known (otherwise null)
Get an XDM Item holding the contents of this resource.
Returns: