Package net.sf.saxon.resource
Class XmlResource
- java.lang.Object
- 
- net.sf.saxon.resource.XmlResource
 
- 
- 
Field SummaryFields Modifier and Type Field Description static ResourceFactoryFACTORY
 - 
Constructor SummaryConstructors Constructor Description XmlResource(Configuration config, NodeInfo doc)Create an XML resource using a specific node.XmlResource(Configuration config, AbstractResourceCollection.InputDetails details)XmlResource(NodeInfo doc)Create an XML resource using a specific node
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContentType()Get the media type (MIME type) of the resource if knownItemgetItem(XPathContext context)Get an item representing the resource: in this case a document node for the XML document.java.lang.StringgetResourceURI()Get a URI that identifies this resource
 
- 
- 
- 
Field Detail- 
FACTORYpublic static final ResourceFactory FACTORY 
 
- 
 - 
Constructor Detail- 
XmlResourcepublic XmlResource(NodeInfo doc) Create an XML resource using a specific node- Parameters:
- doc- the node in question (usually but not necessarily a document node)
 
 - 
XmlResourcepublic XmlResource(Configuration config, NodeInfo doc) Create an XML resource using a specific node. (Method retained for backwards compatibility).- Parameters:
- config- the Saxon Configuration. This must be the configuration to which the node belongs.
- doc- the node in question (usually but not necessarily a document node)
 
 - 
XmlResourcepublic XmlResource(Configuration config, AbstractResourceCollection.InputDetails details) 
 
- 
 - 
Method Detail- 
getResourceURIpublic java.lang.String getResourceURI() Description copied from interface:ResourceGet a URI that identifies this resource- Specified by:
- getResourceURIin interface- Resource
- Returns:
- a URI identifying this resource
 
 - 
getItempublic Item getItem(XPathContext context) throws XPathException Get an item representing the resource: in this case a document node for the XML document.- Specified by:
- getItemin interface- Resource
- Parameters:
- context- the XPath evaluation context
- Returns:
- the document; or null if there is an error and the error is to be ignored
- Throws:
- XPathException- if (for example) XML parsing fails
 
 - 
getContentTypepublic java.lang.String getContentType() Get the media type (MIME type) of the resource if known- Specified by:
- getContentTypein interface- Resource
- Returns:
- the string "application/xml"
 
 
- 
 
-