Modifier and Type | Field and Description |
---|---|
static ResourceFactory |
FACTORY |
Constructor and Description |
---|
XmlResource(NodeInfo doc)
Create an XML resource using a specific node
|
XmlResource(XPathContext context,
AbstractResourceCollection.InputDetails details) |
XmlResource(XPathContext context,
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()
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(XPathContext context, NodeInfo doc)
context
- the Saxon evaluation context. This must belong to the configuration to which the node
belongs.doc
- the node in question (usually but not necessarily a document node)public XmlResource(XPathContext context, AbstractResourceCollection.InputDetails details)
public java.lang.String getResourceURI()
Resource
getResourceURI
in interface Resource
public Item getItem() throws XPathException
getItem
in interface Resource
XPathException
- if (for example) XML parsing failspublic java.lang.String getContentType()
getContentType
in interface Resource
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.