<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: open URL as text, import text as data table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6905#M6899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much! So the first trick you showed had a null effect, however the get text function you showed did indeed copy and paste the output of that XML file into my log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Time for my next question. Is there anyway to parse the data to get specific text from the log window? The script that I wrote to parse the text for specific data references the data table that JMP creates after i choose file-&amp;gt;import as data. The entire goal of this would be for me to write a script that could automatically go through the URL opening process, paste the text into the log like it does now, search the log for a specfic item (its located in the same place everytime I open a new url) and paste that into a new jmp table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thank you very much @MS you have helped me chip away at this problem!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Jun 2013 23:11:01 GMT</pubDate>
    <dc:creator>scottmpatt</dc:creator>
    <dc:date>2013-06-12T23:11:01Z</dc:date>
    <item>
      <title>open URL as text, import text as data table</title>
      <link>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6902#M6896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all, I am very new to scripting in JMP and I had some questions about my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what I have. There is a data table I created called yield_production_5292013.jmp. In this data table I have a cloumn with a bunch of separate URL's that get sent to a website which in turn gives me an xml file with lots of data that JMP opens as text. What I would like to do is open each url in jmp then have a script to automatically import this text file as a new table.(this is compared to manually selecting file&amp;gt;import as data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know this seems odd to open a file as text then import it as a new table, however if I open the url output as a data table from the get go, the resulting table is unusable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already written the script that I use &lt;STRONG&gt;&lt;EM&gt;after&lt;/EM&gt;&lt;/STRONG&gt; this text is imported as a data table, and it searches the appropriate column and row for the two data points that I need and copies them into the correct location in a new file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I have so far, I know it isnt much but at least this opens up one url as a text file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt = data table ("yield_production_5292013");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i=1; // i have 1780 rows of urls to be opened, however i want to get the code running for a single line before I expand it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt = current data table();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open(column("URL")&lt;I&gt;);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens after I run this script is a file pops up called v4.xml&lt;/P&gt;&lt;P&gt;I want my code to then import this text as data.&lt;/P&gt;&lt;P&gt;Anybody know how to help????&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 15:55:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6902#M6896</guid>
      <dc:creator>scottmpatt</dc:creator>
      <dc:date>2013-06-12T15:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: open URL as text, import text as data table</title>
      <link>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6903#M6897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;IMPORTANT EDIT!!!!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I run the script that I posted, it doesnt open the XML output from the website as a texxt document, it actually copies and pastes that output as a &lt;EM&gt;&lt;STRONG&gt;new script file&lt;/STRONG&gt;&lt;/EM&gt;!!!!! If I were to continue manually I would still have to go file&amp;gt;import as data, however I dont want to do this because I would be stuck at my computer for days!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyone who can help me automate this process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 16:43:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6903#M6897</guid>
      <dc:creator>scottmpatt</dc:creator>
      <dc:date>2013-06-12T16:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: open URL as text, import text as data table</title>
      <link>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6904#M6898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The script editor and and the "open as text" window look the same. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to open an xml file on a web server using your code but instead of open as text or table within imp my default xml editor was launched. Maybe that's beacause I use JMP on a Mac.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens if you try this?: &lt;SPAN style="font-family: Courier; font-size: 12px; color: #032ce4;"&gt;open&lt;/SPAN&gt;&lt;STRONG style="font-family: Courier; font-size: 12px;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier; font-size: 12px; color: #032ce4;"&gt;column&lt;/SPAN&gt;&lt;STRONG style="font-family: Courier; font-size: 12px;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier; font-size: 12px; color: #942193;"&gt;"URL"&lt;/SPAN&gt;&lt;STRONG style="font-family: Courier; font-size: 12px;"&gt;)[&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier; font-size: 12px;"&gt;i&lt;/SPAN&gt;&lt;STRONG style="font-family: Courier; font-size: 12px;"&gt;]&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier; font-size: 12px; color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier; font-size: 12px;"&gt; html table&lt;/SPAN&gt;&lt;STRONG style="font-family: Courier; font-size: 12px;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier; font-size: 12px; color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-family: Courier; font-size: 12px;"&gt;))&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier; font-size: 12px; color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If "pretending" it's a html-page in this way, the XML code opens in a a data table, at least for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you get the xml in a script window it's quite straight forward to fetch the content as a string and extract the pieces you need without going via a data table.&lt;/P&gt;&lt;P&gt;To get the text as a variable, try: &lt;SPAN style="font-family: Courier; font-size: 12px;"&gt;xml &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier; font-size: 12px; color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier; font-size: 12px; color: #032ce4;"&gt;Window&lt;/SPAN&gt;&lt;STRONG style="font-family: Courier; font-size: 12px;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier; font-size: 12px; color: #942193;"&gt;"v4.xml"&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-family: Courier; font-size: 12px;"&gt;)[&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier; font-size: 12px; color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-family: Courier; font-size: 12px;"&gt;]&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier; font-size: 12px; color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier; font-size: 12px;"&gt; get text&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier; font-size: 12px; color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #011993;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Have a look at jsl's XML functions. It is possible to extract any value form a string of valid XML using them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 20:04:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6904#M6898</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2013-06-12T20:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: open URL as text, import text as data table</title>
      <link>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6905#M6899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much! So the first trick you showed had a null effect, however the get text function you showed did indeed copy and paste the output of that XML file into my log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Time for my next question. Is there anyway to parse the data to get specific text from the log window? The script that I wrote to parse the text for specific data references the data table that JMP creates after i choose file-&amp;gt;import as data. The entire goal of this would be for me to write a script that could automatically go through the URL opening process, paste the text into the log like it does now, search the log for a specfic item (its located in the same place everytime I open a new url) and paste that into a new jmp table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thank you very much @MS you have helped me chip away at this problem!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 23:11:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6905#M6899</guid>
      <dc:creator>scottmpatt</dc:creator>
      <dc:date>2013-06-12T23:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: open URL as text, import text as data table</title>
      <link>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6906#M6900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't bother with the log. With the command&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Courier;"&gt;xml &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Courier; color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Courier;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Courier; color: #032ce4;"&gt;Window&lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-size: 12px; font-family: Courier;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Courier;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Courier; color: #942193;"&gt;"v4.xml"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Courier;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-size: 12px; font-family: Courier;"&gt;)[&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Courier; color: #009193;"&gt;&lt;STRONG style="font-style: inherit; font-size: 12px; font-family: inherit;"&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-size: 12px; font-family: Courier;"&gt;]&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Courier;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Courier; color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Courier;"&gt; get text&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: Courier; color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;the text is stored in the variable &lt;EM&gt;xml&lt;/EM&gt; (can have any name) that is ready to use.&lt;/P&gt;&lt;P&gt;There are several ways to dig out specific items from strings. As it apparently is xml code the Parse XML function would be powerful. Or regex if the item (or surrounding text) always has a some unique pattern. &lt;/P&gt;&lt;P&gt;Hard to give specific tips without an example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 00:51:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6906#M6900</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2013-06-13T00:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: open URL as text, import text as data table</title>
      <link>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6907#M6901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All I needed to do was specify what format for jmp to open my file!! dt = data table ("yield_production_5292013"); i=1; dt = current data table(); open(column("URL")&lt;I&gt;, text); so by putting ", text" in the open function I was able to open the info into a data table!!!!! such a small change for such a big impact.&lt;/I&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 18:35:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/open-URL-as-text-import-text-as-data-table/m-p/6907#M6901</guid>
      <dc:creator>scottmpatt</dc:creator>
      <dc:date>2013-06-13T18:35:05Z</dc:date>
    </item>
  </channel>
</rss>

