プリコンパイルされた実行可能ファイルのロード

XCompilationFactory インターフェースとそのインターフェースのさまざまなロード・メソッドを使用して、 プリコンパイルされた式、照会、またはスタイルシートをロードできます。 これらのロード・メソッドは Java™ クラスをロードし、 それぞれ XPathExecutable、XQueryExecutable、XSLTExecutable オブジェクトを返します。

手順

以下に、プリコンパイルされた XPath 式をロードする基本的な例を示します。
// Create the factory
XFactory factory = XFactory.newInstance();

// Get the compilation factory
XCompilationFactory compileFactory = factory.getCompilationFactory();

// Create the compilation parameters
XCompilationParameters params = compileFactory.newCompilationParameters("MyXPath");
params.setPackageName( "org.example.myxpath");

// Load the executable
XPathExecutable executable = compileFactory.loadXPath(params);        

// Create the input source
StreamSource input = new StreamSource("simple.xml");

// Execute the XPath expression
XSequenceCursor cursor = executable.execute(input);

さらに、XQuery および XSLT にも適切なロード・メソッドを使用できます。


トピックのタイプを示すアイコン タスク・トピック



タイム・スタンプ・アイコン 最終更新: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_loading
ファイル名:txml_loading.html