xPath コーディングのヘルプJMP 表示出力から要素を取得する際に xPath を学習/使用しようとしています。学習のために、非常に単純な二変量出力を用意し、表示出力から直接予測式を取得しようとしています。

JSL
names default to here(1);
dt = Open("$Sample_Data/big class.jmp");
ow = Bivariate(
Y( :weight ),
X( :height ),
Fit Line( {Line Color( "Medium Dark Green" )} )
);
問題:
次の Display Tree 呼び出しを使用して数式を簡単に取得できます。
zap = report(ow)["Linear Fit"][TextBox(1)] << get text;
xPath 取得から 4 番目の TextBox からテキストを取得することでアクセスすることもできます。
zip = (report(ow) << XPath("//TextEditBox"))[4] << get text ;
ただし、添字の値が 4 であるため、追加の近似が追加されるなどすると変更される可能性があります。xPathを使用して、「Linear Fit」の値を持つアウトラインボックスの後の最初のテキストボックスを取得したいと考えています。
xPath の専門家で解決策をお持ちの方はいらっしゃいますか。
自動化とスクリプト作成データの探索と視覚化品質およびプロセスエンジニアリングRe: xPath コーディングのヘルプジム、そのようにアプローチすることもできますが、その方法は XPath 言語の要点を覆します。 すべての作業を行ってくれるはずです。
Re: xPath コーディングのヘルプ以下に、ツリー構造をナビゲートするのに役立つ他の xpath 式をいくつか示します。
// Note: the * in these examples can also be replaced by the class of
// the element you are looking for e.g. TableBox, OutlineBox
rpt = report(ow);
// Gets immediate children of the Outlinebox (ItsTableBox)
rpt << xpath("//OutlineBox[text()='Summary of Fit']/*");
// Gets all descendants of the Outlinebox (TableBox AND all of its ColBoxes)
rpt << xpath("//OutlineBox[text()='Summary of Fit']//*");
// Gets following elements at the same level of the tree
//(Lack of Fit, Analysis of Variances, Parameter Estimates OutlineBoxes)
rpt << xpath("//OutlineBox[text()='Summary of Fit']/following-sibling::*")
// Gets preceding elements at the same level of the tree (TextEditBox with formula)
rpt << xpath("//OutlineBox[text()='Summary of Fit']/preceding-sibling::*")
// Gets ancestors of the box (ListBox, OutlineBox["Linear Fit"], IfBox, OutlineBox["Bivariate Fit..."])
rpt << xpath("//OutlineBox[text()='Summary of Fit']/ancestor::*")これは、例でナビゲートされるツリー構造です。

このポスターにはさらに多くの例が含まれていますhttps://community.jmp.com/t5/Discovery-Summit-2015/JMP-Discovery-2015-Mining-JMP-Reports-v10-pdf/ta-p/22595
Re: xPath コーディングのヘルプどうもありがとうございます!Re: xPath コーディングのヘルプrpt=ow<<REPORT></REPORT>
Re: xPath コーディングのヘルプ素晴らしい......
特定のアウトラインボックスを検出した後、テキストエディットボックスから値を返す方法、つまり、指定されたアウトラインボックスの後の最初のテキストボックスを返す方法が必要であるとまだ考えています。
Re: xPath コーディングのヘルプああ! この構文は機能します。
biv rep << XPath( "//TextEditBox[contains(text(),\!"=\!")]/text()" );
Re: xPath コーディングのヘルプすべて XPath を使用して実行できるはずです。 最初の例では、すべてのテキストが表示されます。 2 番目の例では XPath 関数を使用しようとしていますが、構文を機能させることができません。
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( Y( :weight ), X( :height ), Fit Line( 1 ) );
biv rep = biv << Report;
// get all texts in a list
biv rep << XPath( "//TextEditBox/text()" );
// get specific text
target = "=";
biv rep << XPath( "//TextEditBox/[contains(text(),target)]/text()" );