<?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: Parsing an XML Document in get.js file in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/parsing-an-xml-document-in-get-js-file/m-p/236062#M189192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is possible by reading the content property of the node then using E4X [1],[2],[3] to parse that content.&amp;nbsp; The following code (note: written from memory - almost certainly contains errors) shows one way of doing this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var node = search.findNode(nodeRef)&lt;BR /&gt;var content = node.content&lt;BR /&gt;var xml = new XML(content)&lt;BR /&gt;var valueOfSomeOtherElement = xml.rootElement.childElement.someOtherElement&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;Line 1 uses the Alfresco "search" API to find the node, given the string value of the NodeRef (eg. "workspace:/SpacesStore/d8470f03-b80a-11da-97b9-8d453af5a554").&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Line 2 reads the content of that node (note: you should check that the node was successfully loaded before attempting to do this - for clarity I omitted that logic in this example).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lines 3 and 4 uses E4X constructs to parse the XML content and retrieve the value of some element within the XML (note: you should check that the MIME type of the loaded node is "text/xml" before attempting to parse the XML - for clarity I omitted that logic in this example).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] &lt;/SPAN&gt;&lt;A href="http://en.wikipedia.org/wiki/ECMAScript_for_XML" rel="nofollow noopener noreferrer"&gt;http://en.wikipedia.org/wiki/ECMAScript_for_XML&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;[2] &lt;/SPAN&gt;&lt;A href="http://www.xml.com/pub/a/2007/11/28/introducing-e4x.html" rel="nofollow noopener noreferrer"&gt;http://www.xml.com/pub/a/2007/11/28/introducing-e4x.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;[3] &lt;/SPAN&gt;&lt;A href="http://www.w3schools.com/e4x/default.asp" rel="nofollow noopener noreferrer"&gt;http://www.w3schools.com/e4x/default.asp&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 04 Oct 2009 05:01:10 GMT</pubDate>
    <dc:creator>pmonks</dc:creator>
    <dc:date>2009-10-04T05:01:10Z</dc:date>
    <item>
      <title>Parsing an XML Document in get.js file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/parsing-an-xml-document-in-get-js-file/m-p/236061#M189191</link>
      <description>Hello,I have written a web script to load part of a HTML file. Within the web script I need to extract the content from an XML file.I have attempted to parseXMLDocument within get.html.ftl but came across a similar problem to that of:http://forums.alfresco.com/en/viewtopic.php?f=36&amp;amp;t=21315Instea</description>
      <pubDate>Mon, 28 Sep 2009 15:19:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/parsing-an-xml-document-in-get-js-file/m-p/236061#M189191</guid>
      <dc:creator>lilyh</dc:creator>
      <dc:date>2009-09-28T15:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing an XML Document in get.js file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/parsing-an-xml-document-in-get-js-file/m-p/236062#M189192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is possible by reading the content property of the node then using E4X [1],[2],[3] to parse that content.&amp;nbsp; The following code (note: written from memory - almost certainly contains errors) shows one way of doing this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var node = search.findNode(nodeRef)&lt;BR /&gt;var content = node.content&lt;BR /&gt;var xml = new XML(content)&lt;BR /&gt;var valueOfSomeOtherElement = xml.rootElement.childElement.someOtherElement&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;Line 1 uses the Alfresco "search" API to find the node, given the string value of the NodeRef (eg. "workspace:/SpacesStore/d8470f03-b80a-11da-97b9-8d453af5a554").&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Line 2 reads the content of that node (note: you should check that the node was successfully loaded before attempting to do this - for clarity I omitted that logic in this example).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lines 3 and 4 uses E4X constructs to parse the XML content and retrieve the value of some element within the XML (note: you should check that the MIME type of the loaded node is "text/xml" before attempting to parse the XML - for clarity I omitted that logic in this example).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] &lt;/SPAN&gt;&lt;A href="http://en.wikipedia.org/wiki/ECMAScript_for_XML" rel="nofollow noopener noreferrer"&gt;http://en.wikipedia.org/wiki/ECMAScript_for_XML&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;[2] &lt;/SPAN&gt;&lt;A href="http://www.xml.com/pub/a/2007/11/28/introducing-e4x.html" rel="nofollow noopener noreferrer"&gt;http://www.xml.com/pub/a/2007/11/28/introducing-e4x.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;[3] &lt;/SPAN&gt;&lt;A href="http://www.w3schools.com/e4x/default.asp" rel="nofollow noopener noreferrer"&gt;http://www.w3schools.com/e4x/default.asp&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Oct 2009 05:01:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/parsing-an-xml-document-in-get-js-file/m-p/236062#M189192</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2009-10-04T05:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing an XML Document in get.js file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/parsing-an-xml-document-in-get-js-file/m-p/236063#M189193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Peter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That was really helpful.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 21:16:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/parsing-an-xml-document-in-get-js-file/m-p/236063#M189193</guid>
      <dc:creator>lilyh</dc:creator>
      <dc:date>2009-10-08T21:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing an XML Document in get.js file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/parsing-an-xml-document-in-get-js-file/m-p/236064#M189194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks is working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 13:24:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/parsing-an-xml-document-in-get-js-file/m-p/236064#M189194</guid>
      <dc:creator>vikash_patel</dc:creator>
      <dc:date>2017-01-23T13:24:35Z</dc:date>
    </item>
  </channel>
</rss>

