許多社區頁面都有一個紅色三角形,其中有一個 RSS 選項,可以在瀏覽器中顯示 XML 文件。 您可以在 JSL 中打開該 URL 並獲取數據表。
// import the rss feed (an xml table) from the JMP blog
dt = Open( // you could save this as an XML file and use the file-open dialog...
"https://community.jmp.com/kvoqx44227/rss/board?board.id=jmp-blog",
XML Settings(Stack( 1 ),
Row( "/rss" ),
Col("/rss/channel/item/title", Column Name( "title" ), Fill( "Use Once" ),
Type( "Character" ), Format( {"Best", 15} ), Modeling Type( "Continuous" )
),
Col( "/rss/channel/item/link", Column Name( "link" ), Fill( "Use Once" ),
Type( "Character" ), Format( {"Best", 15} ), Modeling Type( "Continuous" )
)
),
XML Wizard( 0 ) // use 1 to start the editor
);
// hide the link column
dt:link << hide;
// add the blue links to the title
dt:title << Set Property(
"Event Handler",
Event Handler( // use the Event Handler dialog to generate this script; change thisTable:thisColumn to thisTable:link
Click(JSL Quote(Function( {thisTable, thisColumn, iRow},Web( Char( thisTable:link[ iRow ] ) ); );) ),
Tip(JSL Quote(Function( {thisTable, thisColumn, iRow}, "Open " || Char( thisTable:link[ iRow ] ) || " in your browser."; );) ),
Color(JSL Quote(Function( {thisTable, thisColumn, iRow},RGBColor("link"); );) )
)
);
JSL 使用 JMP 15 的 XML 支持並直接從 URL 打開。 它還添加了一個事件處理程序腳本,以在數據表中創建可點擊的鏈接。 上面幾乎所有的 JSL 都是由 JMP 創建的,而不是手工編寫的。 如果您將瀏覽器的下載保存為 .XML 文件,您可以使用文件->打開->選擇 xml 嚮導打開它,選擇巨大的猜測,選擇堆棧選項,決定保留哪些列,選擇確定。 從生成的表中,從源腳本中獲取 JSL 並將其放入腳本編輯器中。 返回表並使用列屬性編輯器將事件處理程序添加到標題列。 現在使用表格的紅色小三角獲取表格腳本(不含數據)並將其粘貼到另一個編輯器中。 從第二個編輯器中獲取 set property() 位並將其放在第一個編輯器中,如圖所示。
You can click on the blue links in the data table to open a browser windowYou can click on the blue links in the data table to open a browser windowYou can click on the blue links in the data table to open a browser windowYou can click on the blue links in the data table to open a browser window您可以點擊數據表中的藍色鏈接打開瀏覽器窗口