| java.lang.Object org.apache.commons.jxpath.xml.XMLParser2 org.apache.commons.jxpath.xml.DocumentContainer
DocumentContainer | public class DocumentContainer extends XMLParser2 implements Container(Code) | | An XML document container reads and parses XML only when it is
accessed. JXPath traverses Containers transparently -
you use the same paths to access objects in containers as you
do to access those objects directly. You can create
XMLDocumentContainers for various XML documents that may or
may not be accessed by XPaths. If they are, they will be automatically
read, parsed and traversed. If they are not - they won't be
read at all.
author: Dmitri Plotnikov version: $Revision: 1.9 $ $Date: 2004/02/29 14:17:37 $ |
DocumentContainer | public DocumentContainer(URL xmlURL)(Code) | | Use this constructor if the desired model is DOM.
Parameters: URL - is a URL for an XML file.Use getClass().getResource(resourceName) to load XML from aresource file. |
DocumentContainer | public DocumentContainer(URL xmlURL, String model)(Code) | | Parameters: URL - is a URL for an XML file. Use getClass().getResource(resourceName) to load XML from a resource file. Parameters: model - is one of the MODEL_* constants defined in this class. Itdetermines which parser should be used to load the XML. |
getValue | public Object getValue()(Code) | | Reads XML, caches it internally and returns the Document.
|
registerXMLParser | public static void registerXMLParser(String model, XMLParser parser)(Code) | | Add an XML parser. Parsers for the models "DOM" and "JDOM" are
pre-registered.
|
registerXMLParser | public static void registerXMLParser(String model, String parserClassName)(Code) | | Add a class of a custom XML parser.
Parsers for the models "DOM" and "JDOM" are pre-registered.
|
setValue | public void setValue(Object value)(Code) | | Throws an UnsupportedOperationException
|
|
|