Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/364.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 加载外部资源/API_Javascript_Java_Node.js_Xpath - Fatal编程技术网

Javascript 加载外部资源/API

Javascript 加载外部资源/API,javascript,java,node.js,xpath,Javascript,Java,Node.js,Xpath,我有一个lib,在uk.ac.ox.cs.diadem.oxpath.oxpath示例下有一个API 在java中,我会这样使用它 //从API加载 包uk.ac.ox.cs.diadem.oxpath.oxpath-example; //调用OXPath OXPath.ENGINE.evaluate(输入、浏览器、输出处理器) 可以找到完整的文档。第30页(第3.2节之前的最后一段)说我可以将其嵌入JavaScript,但这里只有一个java示例 如何将OXPath加载到JavaScript项

我有一个lib,在
uk.ac.ox.cs.diadem.oxpath.oxpath示例下有一个API

在java中,我会这样使用它

//从API加载
包uk.ac.ox.cs.diadem.oxpath.oxpath-example;
//调用OXPath
OXPath.ENGINE.evaluate(输入、浏览器、输出处理器)

可以找到完整的文档。第30页(第3.2节之前的最后一段)说我可以将其嵌入JavaScript,但这里只有一个java示例

如何将OXPath加载到JavaScript项目中

编辑

我试过这个:


var-oxpath=require(“uk.ac.ox.cs.diadem.oxpath”);//错误
您能详细解释一下您的用例吗?

您的问题中提供的“OXPath简介”文档不再可用。这可能是因为2018年发布了最新版本

请看这里:

参考本文件,第43页第3.7节内容如下:

(见第1.3.3节) 第14页),hcsv的HierarchyCSVOutputHandler, rsjdbc的RecStreamJDBCOutputHandler(见第16页第1.3.4节),以及 hjdbc的HierarchyJDBC输出处理器。 OXPath CLI(v.1.0.1)是OXPath的命令行界面。 Java文档API可从以下站点获得:。 3/javadoc/

我认为目前还没有Javascript API,但它们可能指的是您可以将java类用于Javascript的事实。请看这里:

但是,考虑到基线引擎依赖于selenium打开浏览器并在OXPath查询中导航各种URL,即使使用X视频帧缓冲区,OXPath在任何客户端代码环境中都不可用

Different components of OXPath are united under the umbrella name OXPath Project.
The current version of OXPath (2.2.0) and OXPath CLI (1.0.1) are generated by OXPath
Project 1.0.3. It consists of the following main components:
OXPath Core (v.2.2.0) implementing the core functionality of the OXPath language.
WebAPI (v.1.4.0) implementing an interface to web browsers based on Selenium 2.53.1
(only Firefox 47.0.1 is currently supported).
Output Handlers are a set of modules for serialising the output tree of OXPath into
different formats. The following output handlers are available: XMLOutputHandler
for XML (see Section 1.3.1 on page 13), JsonOutputHandler for JSON (see Section 1.3.2 on page 13), RecStreamCSVOutputHandler for rscsv