Modifier and Type | Field and Description |
---|---|
static ResourceFactory |
FACTORY |
Constructor and Description |
---|
XmlResource(Configuration config,
AbstractResourceCollection.InputDetails details) |
XmlResource(Configuration config,
NodeInfo doc)
Create an XML resource using a specific node.
|
XmlResource(NodeInfo doc)
Create an XML resource using a specific node
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType()
Get the media type (MIME type) of the resource if known
|
Item |
getItem(XPathContext context)
Get an item representing the resource: in this case a document node for the XML document.
|
java.lang.String |
getResourceURI()
Get a URI that identifies this resource
|
public static final ResourceFactory FACTORY
public XmlResource(NodeInfo doc)
doc
- the node in question (usually but not necessarily a document node)public XmlResource(Configuration config, NodeInfo doc)
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)public XmlResource(Configuration config, AbstractResourceCollection.InputDetails details)
public java.lang.String getResourceURI()
Resource
getResourceURI
in interface Resource
public Item getItem(XPathContext context) throws XPathException
getItem
in interface Resource
context
- the XPath evaluation contextXPathException
- if (for example) XML parsing failspublic java.lang.String getContentType()
getContentType
in interface Resource
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.