cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Craige_Hales
Super User
Open an RSS Feed in JMP

Many of the community pages have a red triangle that has an RSS option that will display an XML file in a browser. You can open that URL in JSL and get a data table.

 

// 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"); );)		)
	)
);

 

The JSL uses JMP 15's XML support and opens directly from the URL. It also adds an Event Handler script to make clickable links in the data table. Almost all of the JSL above was created by JMP, not written by hand. If you save the browser's download as a .XML file, you can open it with File->Open->pick the xml wizard, pick huge guess, pick the stack option, decide what columns to keep, pick OK. From the resulting table, get the JSL from the source script and put it in a script editor. Go back to the table and use the column property editor to add the Event Handler to the title column. Now use the table's red triangle to get the table script (without data) and paste that in another editor. Grab the set property() bit from the 2nd editor and put it in the 1st as shown. 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 window

Last Modified: Dec 19, 2019 11:58 PM