/** * Returns the source document used by this TrAX source. * * @return the source document used by this TrAX source or * <code>null</code> if the source is a node list. * * @see #setDocument */ public Document getDocument() { Object src = ((JDOMInputSource)getInputSource()).getSource(); Document doc = null; if (src instanceof Document) { doc = (Document)src; } return doc; }
/** * Returns the source node list used by this TrAX source. * * @return the source node list used by this TrAX source or * <code>null</code> if the source is a JDOM document. * * @see #setDocument */ public List getNodes() { Object src = ((JDOMInputSource)getInputSource()).getSource(); List nodes = null; if (src instanceof List) { nodes = (List)src; } return nodes; }