public class XInclusionContextImpl extends Object implements XInclusionContext
Modifier and Type | Field and Description |
---|---|
protected DocumentCache |
docCache |
Document |
preloadedDoc |
boolean |
xptrSemantics |
Constructor and Description |
---|
XInclusionContextImpl(boolean xptrSemantics,
Document preloadedDoc) |
Modifier and Type | Method and Description |
---|---|
protected DocumentCache |
createDocumentCache() |
Element |
findElementById(Document doc,
String id)
Searches specified document for an element having specified ID.
|
Document |
getDocument(URL url)
Opens and returns the document corresponding to specified URL.
|
public final boolean xptrSemantics
public final Document preloadedDoc
protected DocumentCache docCache
public XInclusionContextImpl(boolean xptrSemantics, Document preloadedDoc)
public Document getDocument(URL url) throws InclusionException
XInclusionContext
getDocument
in interface XInclusionContext
url
- URL of the documentInclusionException
- if, for any reason,
specified document cannot be openedprotected DocumentCache createDocumentCache()
public Element findElementById(Document doc, String id)
XInclusionContext
findElementById
in interface XInclusionContext
doc
- document to be searchedid
- searched IDnull
if such element is not found