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 전문가 중 솔루션을 갖고 있는 분이 계십니까?
자동화 및 스크립팅데이터 탐색 및 시각화품질 및 프로세스 엔지니어링답변: xPath 코딩 도움말Jim, 그런 식으로 접근할 수는 있지만 그런 방식은 XPath 언어의 요점을 뒤집는 것입니다. 그것은 당신을 위해 모든 작업을 수행하기로되어 있습니다.
답변: 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
답변: xPath 코딩 도움말매우 감사합니다!답변: xPath 코딩 도움말rpt=ow<<REPORT></REPORT>
답변: xPath 코딩 도움말감독자......
특정 아웃라인 상자를 감지한 후 TextEditBox에서 값을 반환하는 방법, 즉 지정된 아웃라인 상자 다음에 첫 번째 텍스트 상자를 반환하는 방법이 있어야 한다고 여전히 생각하고 있습니다.
답변: xPath 코딩 도움말아하! 이 구문은 작동합니다!
biv rep << XPath( "//TextEditBox[contains(text(),\!"=\!")]/text()" );
답변: xPath 코딩 도움말XPath로 이 모든 것을 할 수 있어야 합니다. 첫 번째 예는 모든 텍스트를 제공합니다. 두 번째 예에서는 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()" );