<?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 Javascript API question in relation to general javascript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/javascript-api-question-in-relation-to-general-javascript/m-p/171573#M124818</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to achieve the following. When i check in a XML file into a space, i want a content rule on that space to alter the xml file to add a processing instruction. This processing instruction would be the reference to a XSL stylesheet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By running a script with the content rule i can write my own javascript. In "normal"&amp;nbsp; javascript i would have been able to address an XMLDOM object to change the XML file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is something like this possible too with the Alfresco Javascript API?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Koen Bonnet&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Feb 2008 16:21:06 GMT</pubDate>
    <dc:creator>kbonnet</dc:creator>
    <dc:date>2008-02-29T16:21:06Z</dc:date>
    <item>
      <title>Javascript API question in relation to general javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-api-question-in-relation-to-general-javascript/m-p/171573#M124818</link>
      <description>Hi all,I want to achieve the following. When i check in a XML file into a space, i want a content rule on that space to alter the xml file to add a processing instruction. This processing instruction would be the reference to a XSL stylesheet.By running a script with the content rule i can write my</description>
      <pubDate>Fri, 29 Feb 2008 16:21:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-api-question-in-relation-to-general-javascript/m-p/171573#M124818</guid>
      <dc:creator>kbonnet</dc:creator>
      <dc:date>2008-02-29T16:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API question in relation to general javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-api-question-in-relation-to-general-javascript/m-p/171574#M124819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is possible either using direct string manipulation of the content or via a more strongly typed mechanism such as E4X (&lt;/SPAN&gt;&lt;A href="http://en.wikipedia.org/wiki/E4X" rel="nofollow noopener noreferrer"&gt;http://en.wikipedia.org/wiki/E4X&lt;/A&gt;&lt;SPAN&gt;)[1].&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Either way, once you've read out the content from the file and modified it, you'd use the Javascript API to write the modified content back into the file (see &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API#Modifying_and_Creating_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/JavaScript_API#Modifying_and_Creating_API&lt;/A&gt;&lt;SPAN&gt; for details).&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] Note: E4X support has only been enabled in the 2.9 release at this point, but details on how to enable it in earlier versions of Alfresco are in JIRA ticket AR-1720 (&lt;/SPAN&gt;&lt;A href="http://issues.alfresco.com/browse/AR-1720" rel="nofollow noopener noreferrer"&gt;http://issues.alfresco.com/browse/AR-1720&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 16:29:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-api-question-in-relation-to-general-javascript/m-p/171574#M124819</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2008-02-29T16:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API question in relation to general javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-api-question-in-relation-to-general-javascript/m-p/171575#M124820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Peter,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for your reply. I was already working out the string manipulation and writing back, but it seems to me that's not the preferred way to modify xml. I will read into the E4X. That sounds powerful!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 17:17:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-api-question-in-relation-to-general-javascript/m-p/171575#M124820</guid>
      <dc:creator>kbonnet</dc:creator>
      <dc:date>2008-02-29T17:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API question in relation to general javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-api-question-in-relation-to-general-javascript/m-p/171576#M124821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No worries!&amp;nbsp; FWIW I'll often use regular expressions and simple string operations for simple modifications to XML - it's often quicker / easier / faster than pulling out the big guns of a "real" XML parsing engine (such as E4X).&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 17:20:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-api-question-in-relation-to-general-javascript/m-p/171576#M124821</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2008-02-29T17:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API question in relation to general javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-api-question-in-relation-to-general-javascript/m-p/171577#M124822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks. Backed up by the pro's! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 17:25:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-api-question-in-relation-to-general-javascript/m-p/171577#M124822</guid>
      <dc:creator>kbonnet</dc:creator>
      <dc:date>2008-02-29T17:25:05Z</dc:date>
    </item>
  </channel>
</rss>

