<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[possible to read xml file in custom widget?]]></title><description><![CDATA[<p dir="auto">Hey <a class="plugin-mentions-user plugin-mentions-a" href="/user/jkandasa" aria-label="Profile: jkandasa">@<bdi>jkandasa</bdi></a>,</p>
<p dir="auto">first I have to admin: I'm a total js dummy...<br />
I tried to create a dropdown list and read data from a xml file to fill this list.<br />
I used this online tutorial <a href="http://www.plus2net.com/javascript_tutorial/xml-xmlhttprequest.php" rel="nofollow ugc">http://www.plus2net.com/javascript_tutorial/xml-xmlhttprequest.php</a> but when I try it I get <code>ReferenceError: "window" is not defined in  at line number 5</code>. Can you help me how to read this file or is it not possible?</p>
]]></description><link>http://forum.mycontroller.org/topic/193/possible-to-read-xml-file-in-custom-widget</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 16:11:13 GMT</lastBuildDate><atom:link href="http://forum.mycontroller.org/topic/193.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 08 Sep 2017 12:11:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Fri, 04 May 2018 03:48:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/anduril" aria-label="Profile: anduril">@<bdi>anduril</bdi></a> I have removed the old method <code>readXmlByXpath</code>. Introduced XmlApi class to address xml stuff.</p>
<ul>
<li><code>mcApi.xml().read(uri, xpath)</code> - Returns <code>String</code>
<ul>
<li><code>uri</code> - can be local disk path or http url</li>
<li><code>xpath</code> - should be a valid xpath</li>
</ul>
</li>
<li><code>mcApi.xml().readAsList(uri, xpath) </code> - Returns <code>List&lt;Map&lt;String, String&gt;&gt;</code>
<ul>
<li><code>uri</code> - can be local disk path or http url</li>
<li><code>xpath</code> - should be a valid xpath</li>
</ul>
</li>
<li><code>mcApi.xml().update(uri, xpath, value) </code>
<ul>
<li><code>uri</code> - should be local disk path</li>
<li><code>xpath</code> - should be a valid xpath</li>
<li><code>value</code> - String value will be replaced on xpath</li>
</ul>
</li>
</ul>
<blockquote>
<p dir="auto">Is it also possible to update the values in the xml file? I don't mean adding new nodes or other fancy stuff, only updating for example /student/details/class from Three to Four.</p>
</blockquote>
<p dir="auto">Yes, now it is possible with,</p>
<pre><code class="language-javascript">mcApi.xml().update("/tmp/file-xml-demo.xml", "/student/details[1]/class", "Four");
</code></pre>
<blockquote>
<p dir="auto">As far as I read the xpath is just a pointer in the tree of an xml, so there is no option to manipulate items. Maybe there is another function available to do this.</p>
</blockquote>
<p dir="auto">You can call <code>readAsList</code>,</p>
<pre><code class="language-javascript">var list = mcApi.xml().readAsList("/tmp/file-xml-demo.xml", "//id[text()='4']/..");
// get first result
var item = list.get(0);

// get name, id, class
item.get("name");
item.get("id");
item.get("class");
</code></pre>
]]></description><link>http://forum.mycontroller.org/post/1759</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1759</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Fri, 04 May 2018 03:48:09 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Thu, 03 May 2018 13:55:27 GMT]]></title><description><![CDATA[<p dir="auto">This feature is great (at least for my usage). Is it also possible to update the values in the xml file? I don't mean adding new nodes or other fancy stuff, only updating for example <code>/student/details/class</code> from <code>Three</code>to <code>Four</code>.<br />
As far as I read the xpath is just a pointer in the tree of an xml, so there is no option to manipulate items. Maybe there is another function available to do this.</p>
]]></description><link>http://forum.mycontroller.org/post/1755</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1755</guid><dc:creator><![CDATA[Anduril]]></dc:creator><pubDate>Thu, 03 May 2018 13:55:27 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Thu, 03 May 2018 11:25:28 GMT]]></title><description><![CDATA[<p dir="auto">wow that's great... thanks a lot.</p>
]]></description><link>http://forum.mycontroller.org/post/1753</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1753</guid><dc:creator><![CDATA[Anduril]]></dc:creator><pubDate>Thu, 03 May 2018 11:25:28 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Fri, 04 May 2018 03:38:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/anduril" aria-label="Profile: Anduril">@<bdi>Anduril</bdi></a> Feature available in <a href="https://drive.google.com/drive/u/0/folders/0BzuumrtRA7p6Z0hCX2V6cVh2ckU" rel="nofollow ugc">SNAPSHOT</a> version.</p>
<p dir="auto">you can read xml content by xpath. To know more about xpath do google or have a look on <a href="https://www.w3schools.com/xml/xpath_intro.asp" rel="nofollow ugc">https://www.w3schools.com/xml/xpath_intro.asp</a></p>
<p dir="auto">Function/Method: <code>mcApi.xml().read(uri, xpath)</code>  - Returns <code>String</code></p>
<ul>
<li>uri - can be local disk path or http url</li>
<li>xpath - should be a valid xpath</li>
</ul>
<pre><code class="language-javascript">var myImports = new JavaImporter(java.io, java.lang, java.util, java.text);

with(myImports) {
 var myData = mcApi.xml().read("http://www.plus2net.com/php_tutorial/file-xml-demo.xml", "/student/details/id[text()='3']/../name");
}
</code></pre>
<h4>Some of xpath example:</h4>
<p dir="auto">XML content,</p>
<pre><code class="language-xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;student&gt;
  &lt;details&gt;
    &lt;id&gt;1&lt;/id&gt;
    &lt;name&gt;John Deo&lt;/name&gt;
    &lt;class&gt;Four&lt;/class&gt;
  &lt;/details&gt;
  &lt;details&gt;
    &lt;id&gt;2&lt;/id&gt;
    &lt;name&gt;Max Ruin&lt;/name&gt;
    &lt;class&gt;Three&lt;/class&gt;
  &lt;/details&gt;
  &lt;details&gt;
    &lt;id&gt;3&lt;/id&gt;
    &lt;name&gt;Arnold&lt;/name&gt;
    &lt;class&gt;Three&lt;/class&gt;
  &lt;/details&gt;
  &lt;details&gt;
    &lt;id&gt;4&lt;/id&gt;
    &lt;name&gt;Krish Star&lt;/name&gt;
    &lt;class&gt;Four&lt;/class&gt;
  &lt;/details&gt;
  &lt;details&gt;
    &lt;id&gt;5&lt;/id&gt;
    &lt;name&gt;John Mike&lt;/name&gt;
    &lt;class&gt;Four&lt;/class&gt;
  &lt;/details&gt;
&lt;/student&gt;
</code></pre>
<ul>
<li>Read <code>student</code>:
<ul>
<li><code>/student</code></li>
</ul>
</li>
<li>Read <code>name</code> where <code>id</code> is <code>4</code>:
<ul>
<li><code>/student/details/id[text()='4']/../name</code></li>
<li><code>//id[text()='4']/../name</code></li>
</ul>
</li>
<li>Read <code>class</code> of 2nd element:
<ul>
<li><code>/student/details[2]/class</code></li>
<li><code>//details[2]/class</code></li>
</ul>
</li>
<li>Read <code>id</code> where the <code>name</code> is <code>John Mike</code>:
<ul>
<li><code>/student/details/name[text()='John Mike']/../id</code></li>
<li><code>//name[text()='John Mike']/../id</code></li>
</ul>
</li>
</ul>
]]></description><link>http://forum.mycontroller.org/post/1752</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1752</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Fri, 04 May 2018 03:38:52 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Thu, 03 May 2018 08:25:06 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://github.com/mycontroller-org/mycontroller/issues/449" rel="nofollow ugc">https://github.com/mycontroller-org/mycontroller/issues/449</a></p>
]]></description><link>http://forum.mycontroller.org/post/1751</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1751</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Thu, 03 May 2018 08:25:06 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Thu, 03 May 2018 07:45:17 GMT]]></title><description><![CDATA[<p dir="auto">Thanks a lot, it works that way. Now my next problem is how to find specific information in this data. I could try to parse line by line, as I have a fixed structure. But maybe it would be easier to create a generic xml parsing mechanism. This would also allow for easier export to xml (my next step when reading works flawless).</p>
]]></description><link>http://forum.mycontroller.org/post/1750</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1750</guid><dc:creator><![CDATA[Anduril]]></dc:creator><pubDate>Thu, 03 May 2018 07:45:17 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Wed, 02 May 2018 14:39:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/anduril" aria-label="Profile: anduril">@<bdi>anduril</bdi></a> <code>mcApi.http()</code> used to access from network/internet. We cannot use it to access local disk files.</p>
<p dir="auto">To access local disk files, you can use the following program,</p>
<pre><code class="language-javascript">var myImports = new JavaImporter(java.io, java.lang, java.util, java.text, org.apache.commons.io.FileUtils);

with(myImports) {
 var xmlData = FileUtils.readFileToString(FileUtils.getFile("/tmp/file-xml-demo.xml"));
}
</code></pre>
]]></description><link>http://forum.mycontroller.org/post/1748</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1748</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Wed, 02 May 2018 14:39:55 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Wed, 02 May 2018 12:15:53 GMT]]></title><description><![CDATA[<p dir="auto">thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/jkandasa" aria-label="Profile: jkandasa">@<bdi>jkandasa</bdi></a>, it was probably a problem solved with the most recent snapshot. I updated and it works now with the online xml.<br />
Using a local xml still yields an error, I think there is an error in my call...</p>
<pre><code>var myImports = new JavaImporter(java.io, java.lang, java.util, java.text);

with(myImports) {
 var response = mcApi.http().get("c:/file-xml-demo.xml");
 if(response.responseCode == 200){
    var xmlData = response.entity;
 }
}
</code></pre>
<p dir="auto">using [...]get("c:\file-[...] does not work either, so it's not a problem with slash and backslash.<br />
The html file only contains this:</p>
<pre><code>${xmlData}
</code></pre>
<p dir="auto">Using the <code>run now</code>option I get this error:</p>
<pre><code>TypeError: Cannot get property "responseCode" of null in  at line number 5
</code></pre>
]]></description><link>http://forum.mycontroller.org/post/1746</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1746</guid><dc:creator><![CDATA[Anduril]]></dc:creator><pubDate>Wed, 02 May 2018 12:15:53 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Mon, 30 Apr 2018 16:25:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/anduril" aria-label="Profile: anduril">@<bdi>anduril</bdi></a> Can you post your complete code?</p>
<p dir="auto">I tested example code once again with SNAPSHOT build, seems everything ok.</p>
<pre><code class="language-json">{
  "myImports": {},
  "response": {
    "uri": "http://www.plus2net.com/php_tutorial/file-xml-demo.xml",
    "entity": "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;student&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;1&lt;/id&gt;\n\t\t\t&lt;name&gt;John Deo&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;2&lt;/id&gt;\n\t\t\t&lt;name&gt;Max Ruin&lt;/name&gt;\n\t\t\t&lt;class&gt;Three&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;3&lt;/id&gt;\n\t\t\t&lt;name&gt;Arnold&lt;/name&gt;\n\t\t\t&lt;class&gt;Three&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;4&lt;/id&gt;\n\t\t\t&lt;name&gt;Krish Star&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;5&lt;/id&gt;\n\t\t\t&lt;name&gt;John Mike&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;6&lt;/id&gt;\n\t\t\t&lt;name&gt;Alex John&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;7&lt;/id&gt;\n\t\t\t&lt;name&gt;My John Rob&lt;/name&gt;\n\t\t\t&lt;class&gt;Fifth&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;8&lt;/id&gt;\n\t\t\t&lt;name&gt;Asruid&lt;/name&gt;\n\t\t\t&lt;class&gt;Five&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;9&lt;/id&gt;\n\t\t\t&lt;name&gt;Tes Qry&lt;/name&gt;\n\t\t\t&lt;class&gt;Six&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;10&lt;/id&gt;\n\t\t\t&lt;name&gt;Big John&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;12&lt;/id&gt;\n\t\t\t&lt;name&gt;Recky&lt;/name&gt;\n\t\t\t&lt;class&gt;Six&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;13&lt;/id&gt;\n\t\t\t&lt;name&gt;Kty&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;14&lt;/id&gt;\n\t\t\t&lt;name&gt;Bigy&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;15&lt;/id&gt;\n\t\t\t&lt;name&gt;Tade Row&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;16&lt;/id&gt;\n\t\t\t&lt;name&gt;Gimmy&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;17&lt;/id&gt;\n\t\t\t&lt;name&gt;Tumyu&lt;/name&gt;\n\t\t\t&lt;class&gt;Six&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;18&lt;/id&gt;\n\t\t\t&lt;name&gt;Honny&lt;/name&gt;\n\t\t\t&lt;class&gt;Five&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;19&lt;/id&gt;\n\t\t\t&lt;name&gt;Tinny&lt;/name&gt;\n\t\t\t&lt;class&gt;Nine&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;20&lt;/id&gt;\n\t\t\t&lt;name&gt;Jackly&lt;/name&gt;\n\t\t\t&lt;class&gt;Nine&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;21&lt;/id&gt;\n\t\t\t&lt;name&gt;Babby John&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;22&lt;/id&gt;\n\t\t\t&lt;name&gt;Reggid&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;23&lt;/id&gt;\n\t\t\t&lt;name&gt;Herod&lt;/name&gt;\n\t\t\t&lt;class&gt;Eight&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;24&lt;/id&gt;\n\t\t\t&lt;name&gt;Tiddy Now&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;25&lt;/id&gt;\n\t\t\t&lt;name&gt;Giff Tow&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;26&lt;/id&gt;\n\t\t\t&lt;name&gt;Crelea&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;27&lt;/id&gt;\n\t\t\t&lt;name&gt;Big Nose&lt;/name&gt;\n\t\t\t&lt;class&gt;Three&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;28&lt;/id&gt;\n\t\t\t&lt;name&gt;Rojj Base&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;29&lt;/id&gt;\n\t\t\t&lt;name&gt;Tess Played&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;30&lt;/id&gt;\n\t\t\t&lt;name&gt;Reppy Red&lt;/name&gt;\n\t\t\t&lt;class&gt;Six&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;31&lt;/id&gt;\n\t\t\t&lt;name&gt;Marry Toeey&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;32&lt;/id&gt;\n\t\t\t&lt;name&gt;Binn Rott&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;33&lt;/id&gt;\n\t\t\t&lt;name&gt;Kenn Rein&lt;/name&gt;\n\t\t\t&lt;class&gt;Six&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;34&lt;/id&gt;\n\t\t\t&lt;name&gt;Gain Toe&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;35&lt;/id&gt;\n\t\t\t&lt;name&gt;Rows Noump&lt;/name&gt;\n\t\t\t&lt;class&gt;Six&lt;/class&gt;\n&lt;/details&gt;\n&lt;/student&gt;",
    "responseCode": 200,
    "headers": [
      {
        "name": "Date",
        "buffer": {
          "full": false,
          "empty": false
        },
        "valuePos": 5,
        "elements": [
          {
            "name": "Mon",
            "parameters": [],
            "parameterCount": 0
          },
          {
            "name": "30 Apr 2018 16:24:19 GMT",
            "parameters": [],
            "parameterCount": 0
          }
        ],
        "value": "Mon, 30 Apr 2018 16:24:19 GMT"
      },
      {
        "name": "Server",
        "buffer": {
          "full": false,
          "empty": false
        },
        "valuePos": 7,
        "elements": [
          {
            "name": "Apache",
            "parameters": [],
            "parameterCount": 0
          }
        ],
        "value": "Apache"
      },
      {
        "name": "Last-Modified",
        "buffer": {
          "full": false,
          "empty": false
        },
        "valuePos": 14,
        "elements": [
          {
            "name": "Sun",
            "parameters": [],
            "parameterCount": 0
          },
          {
            "name": "07 Aug 2016 04:44:57 GMT",
            "parameters": [],
            "parameterCount": 0
          }
        ],
        "value": "Sun, 07 Aug 2016 04:44:57 GMT"
      },
      {
        "name": "ETag",
        "buffer": {
          "full": false,
          "empty": false
        },
        "valuePos": 5,
        "elements": [
          {
            "name": "\"11e3021-b53-53973f62fcef3-gzip\"",
            "parameters": [],
            "parameterCount": 0
          }
        ],
        "value": "\"11e3021-b53-53973f62fcef3-gzip\""
      },
      {
        "name": "Accept-Ranges",
        "buffer": {
          "full": false,
          "empty": false
        },
        "valuePos": 14,
        "elements": [
          {
            "name": "bytes",
            "parameters": [],
            "parameterCount": 0
          }
        ],
        "value": "bytes"
      },
      {
        "name": "Cache-Control",
        "buffer": {
          "full": false,
          "empty": false
        },
        "valuePos": 14,
        "elements": [
          {
            "name": "max-age",
            "value": "172800",
            "parameters": [],
            "parameterCount": 0
          }
        ],
        "value": "max-age=172800"
      },
      {
        "name": "Expires",
        "buffer": {
          "full": false,
          "empty": false
        },
        "valuePos": 8,
        "elements": [
          {
            "name": "Wed",
            "parameters": [],
            "parameterCount": 0
          },
          {
            "name": "02 May 2018 16:24:19 GMT",
            "parameters": [],
            "parameterCount": 0
          }
        ],
        "value": "Wed, 02 May 2018 16:24:19 GMT"
      },
      {
        "name": "Vary",
        "buffer": {
          "full": false,
          "empty": false
        },
        "valuePos": 5,
        "elements": [
          {
            "name": "Accept-Encoding",
            "parameters": [],
            "parameterCount": 0
          },
          {
            "name": "User-Agent",
            "parameters": [],
            "parameterCount": 0
          }
        ],
        "value": "Accept-Encoding,User-Agent"
      },
      {
        "name": "Keep-Alive",
        "buffer": {
          "full": false,
          "empty": false
        },
        "valuePos": 11,
        "elements": [
          {
            "name": "timeout",
            "value": "5",
            "parameters": [],
            "parameterCount": 0
          }
        ],
        "value": "timeout=5"
      },
      {
        "name": "Connection",
        "buffer": {
          "full": false,
          "empty": false
        },
        "valuePos": 11,
        "elements": [
          {
            "name": "Keep-Alive",
            "parameters": [],
            "parameterCount": 0
          }
        ],
        "value": "Keep-Alive"
      },
      {
        "name": "Content-Type",
        "buffer": {
          "full": false,
          "empty": false
        },
        "valuePos": 13,
        "elements": [
          {
            "name": "application/xml",
            "parameters": [],
            "parameterCount": 0
          }
        ],
        "value": "application/xml"
      }
    ]
  },
  "xmlData": "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;student&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;1&lt;/id&gt;\n\t\t\t&lt;name&gt;John Deo&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;2&lt;/id&gt;\n\t\t\t&lt;name&gt;Max Ruin&lt;/name&gt;\n\t\t\t&lt;class&gt;Three&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;3&lt;/id&gt;\n\t\t\t&lt;name&gt;Arnold&lt;/name&gt;\n\t\t\t&lt;class&gt;Three&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;4&lt;/id&gt;\n\t\t\t&lt;name&gt;Krish Star&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;5&lt;/id&gt;\n\t\t\t&lt;name&gt;John Mike&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;6&lt;/id&gt;\n\t\t\t&lt;name&gt;Alex John&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;7&lt;/id&gt;\n\t\t\t&lt;name&gt;My John Rob&lt;/name&gt;\n\t\t\t&lt;class&gt;Fifth&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;8&lt;/id&gt;\n\t\t\t&lt;name&gt;Asruid&lt;/name&gt;\n\t\t\t&lt;class&gt;Five&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;9&lt;/id&gt;\n\t\t\t&lt;name&gt;Tes Qry&lt;/name&gt;\n\t\t\t&lt;class&gt;Six&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;10&lt;/id&gt;\n\t\t\t&lt;name&gt;Big John&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;12&lt;/id&gt;\n\t\t\t&lt;name&gt;Recky&lt;/name&gt;\n\t\t\t&lt;class&gt;Six&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;13&lt;/id&gt;\n\t\t\t&lt;name&gt;Kty&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;14&lt;/id&gt;\n\t\t\t&lt;name&gt;Bigy&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;15&lt;/id&gt;\n\t\t\t&lt;name&gt;Tade Row&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;16&lt;/id&gt;\n\t\t\t&lt;name&gt;Gimmy&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;17&lt;/id&gt;\n\t\t\t&lt;name&gt;Tumyu&lt;/name&gt;\n\t\t\t&lt;class&gt;Six&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;18&lt;/id&gt;\n\t\t\t&lt;name&gt;Honny&lt;/name&gt;\n\t\t\t&lt;class&gt;Five&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;19&lt;/id&gt;\n\t\t\t&lt;name&gt;Tinny&lt;/name&gt;\n\t\t\t&lt;class&gt;Nine&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;20&lt;/id&gt;\n\t\t\t&lt;name&gt;Jackly&lt;/name&gt;\n\t\t\t&lt;class&gt;Nine&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;21&lt;/id&gt;\n\t\t\t&lt;name&gt;Babby John&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;22&lt;/id&gt;\n\t\t\t&lt;name&gt;Reggid&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;23&lt;/id&gt;\n\t\t\t&lt;name&gt;Herod&lt;/name&gt;\n\t\t\t&lt;class&gt;Eight&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;24&lt;/id&gt;\n\t\t\t&lt;name&gt;Tiddy Now&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;25&lt;/id&gt;\n\t\t\t&lt;name&gt;Giff Tow&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;26&lt;/id&gt;\n\t\t\t&lt;name&gt;Crelea&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;27&lt;/id&gt;\n\t\t\t&lt;name&gt;Big Nose&lt;/name&gt;\n\t\t\t&lt;class&gt;Three&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;28&lt;/id&gt;\n\t\t\t&lt;name&gt;Rojj Base&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;29&lt;/id&gt;\n\t\t\t&lt;name&gt;Tess Played&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;30&lt;/id&gt;\n\t\t\t&lt;name&gt;Reppy Red&lt;/name&gt;\n\t\t\t&lt;class&gt;Six&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;31&lt;/id&gt;\n\t\t\t&lt;name&gt;Marry Toeey&lt;/name&gt;\n\t\t\t&lt;class&gt;Four&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;32&lt;/id&gt;\n\t\t\t&lt;name&gt;Binn Rott&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;33&lt;/id&gt;\n\t\t\t&lt;name&gt;Kenn Rein&lt;/name&gt;\n\t\t\t&lt;class&gt;Six&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;34&lt;/id&gt;\n\t\t\t&lt;name&gt;Gain Toe&lt;/name&gt;\n\t\t\t&lt;class&gt;Seven&lt;/class&gt;\n&lt;/details&gt;\n&lt;details&gt;\n\t\t\t&lt;id&gt;35&lt;/id&gt;\n\t\t\t&lt;name&gt;Rows Noump&lt;/name&gt;\n\t\t\t&lt;class&gt;Six&lt;/class&gt;\n&lt;/details&gt;\n&lt;/student&gt;"
}
</code></pre>
]]></description><link>http://forum.mycontroller.org/post/1740</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1740</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Mon, 30 Apr 2018 16:25:41 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Mon, 30 Apr 2018 14:57:43 GMT]]></title><description><![CDATA[<p dir="auto">well I did also tried your example code and it seems <code>mcApi.http().get</code> does not work correctly...</p>
<pre><code>TypeError: mcApi.http is not a function in  at line number 4
</code></pre>
]]></description><link>http://forum.mycontroller.org/post/1739</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1739</guid><dc:creator><![CDATA[Anduril]]></dc:creator><pubDate>Mon, 30 Apr 2018 14:57:43 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Mon, 30 Apr 2018 11:16:00 GMT]]></title><description><![CDATA[<p dir="auto">well the way to access the data is (in my case) not important, I could also use a static parser. I want to open several xml files with all the same structure and extract the data to mycontroller variables. Those could be read and processed in a second step by another script.</p>
]]></description><link>http://forum.mycontroller.org/post/1738</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1738</guid><dc:creator><![CDATA[Anduril]]></dc:creator><pubDate>Mon, 30 Apr 2018 11:16:00 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Mon, 30 Apr 2018 07:04:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/anduril" aria-label="Profile: anduril">@<bdi>anduril</bdi></a> It is possible to read XML file. But as we need to write some implementation to achieve <code>xmlData.name.first</code>. Kindly create a <a href="https://github.com/mycontroller-org/mycontroller/issues" rel="nofollow ugc">ticket</a> for this.</p>
]]></description><link>http://forum.mycontroller.org/post/1735</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1735</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Mon, 30 Apr 2018 07:04:40 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Fri, 27 Apr 2018 12:36:42 GMT]]></title><description><![CDATA[<p dir="auto">hi,</p>
<p dir="auto">is it also possible to read a local xml file? And how can I access the different information in the file, are they transfered to the xmlData as options? So would this file:</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;name id="1"&gt;
  &lt;first&gt;John&lt;/first&gt;
  &lt;last&gt;Doe&lt;/last&gt;
&lt;/name&gt;
</code></pre>
<p dir="auto">be read as for example <code>xmlData.name.first</code></p>
]]></description><link>http://forum.mycontroller.org/post/1731</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1731</guid><dc:creator><![CDATA[Anduril]]></dc:creator><pubDate>Fri, 27 Apr 2018 12:36:42 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Sun, 10 Sep 2017 18:39:13 GMT]]></title><description><![CDATA[<p dir="auto">Thanks a lot four your code, I will try to refine this and get it working. I will have a local xml file in future, but I think I will find a good tutorial for this in the web.</p>
]]></description><link>http://forum.mycontroller.org/post/1147</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1147</guid><dc:creator><![CDATA[Anduril]]></dc:creator><pubDate>Sun, 10 Sep 2017 18:39:13 GMT</pubDate></item><item><title><![CDATA[Reply to possible to read xml file in custom widget? on Sat, 09 Sep 2017 16:44:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/anduril" aria-label="Profile: Anduril">@<bdi>Anduril</bdi></a> I guess <code>XMLHttpRequest</code> won't support JAVA. if you want to read remote XML file you can use the following code,</p>
<pre><code class="language-javascript">var myImports = new JavaImporter(java.io, java.lang, java.util, java.text);

with(myImports) {
 var response = mcApi.http().get("http://www.plus2net.com/php_tutorial/file-xml-demo.xml");
 if(response.responseCode == 200){
    var xmlData = response.entity;
   // your code...
 }
}
</code></pre>
]]></description><link>http://forum.mycontroller.org/post/1145</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1145</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Sat, 09 Sep 2017 16:44:56 GMT</pubDate></item></channel></rss>