xPathコーディングヘルプJMPディスプレイ出力から要素を取得する際にxPathを学習/使用しようとしています。私の学習では、非常に単純な2変量出力があり、表示出力から直接予測式を取得しようとしています。

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" )} )
);
問題:
のDisplayTree呼び出しを使用して、数式を簡単に取得できます。
zap = report(ow)["Linear Fit"][TextBox(1)] << get text;
xPath検索から4番目のTextBoxからテキストを取得してアクセスすることもできます
zip = (report(ow) << XPath("//TextEditBox"))[4] << get text ;
ただし、添え字の値が4であるため、フィットを追加すると変更される可能性があります。xPathを使用して、「LinearFit」の値を持つアウトラインボックスの後の最初のテキストボックスを取得したいと思います。
xPathの専門家の誰かが解決策を持っていますか?
スクリプティング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()" );
Re:xPathコーディングヘルプあはは! この構文は機能します!
biv rep << XPath( "//TextEditBox[contains(text(),\!"=\!")]/text()" );
Re:xPathコーディングヘルプ素晴らしい......
特定のOutlineBoxを検出した後、TextEditBoxから値を返す方法、つまり、指定されたOutlineBoxの後に最初のテキストボックスを返す方法が必要だと私はまだ考えています。
Re:xPathコーディングヘルプrpt=ow<<REPORT></REPORT>
Re: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コーディングヘルプジム、そのようにアプローチすることはできますが、その方法はXPath言語の要点を覆します。 それはあなたのためにすべての仕事をすることになっています。