<?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: I have a document uploaded to a folder along an XML file.  in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52894#M19839</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From Repository JavaScript API, this should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; docXml &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;XML&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Oct 2018 07:31:56 GMT</pubDate>
    <dc:creator>angelborroy</dc:creator>
    <dc:date>2018-10-17T07:31:56Z</dc:date>
    <item>
      <title>I have a document uploaded to a folder along an XML file.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52893#M19838</link>
      <description>I need to parse that XML to add metadata to the document via javascript. I just cannot find a way to extract the value from that XML. Any idea would be welcomed.Thanks.Pablo</description>
      <pubDate>Tue, 16 Oct 2018 08:51:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52893#M19838</guid>
      <dc:creator>nimbus1958</dc:creator>
      <dc:date>2018-10-16T08:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: I have a document uploaded to a folder along an XML file.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52894#M19839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From Repository JavaScript API, this should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; docXml &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;XML&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 07:31:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52894#M19839</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2018-10-17T07:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: I have a document uploaded to a folder along an XML file.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52895#M19840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Angel,&lt;/P&gt;&lt;P&gt;I got that far and it works but my problem is retrieving a value within the XML.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;DocumentSet&amp;gt;&lt;BR /&gt; &amp;lt;Document&amp;gt;&lt;BR /&gt; &amp;lt;FileName&amp;gt;Brief - Lettre_4umqrm82l5ay.pdf&amp;lt;/FileName&amp;gt;&lt;BR /&gt; &amp;lt;FilePath&amp;gt;\\alfresco\alfresco\MailRoom\Brief - Lettre_4umqrm82l5ay.pdf&amp;lt;/FilePath&amp;gt;&lt;BR /&gt; &amp;lt;Confidentiality&amp;gt;3-Organisation&amp;lt;/Confidentiality&amp;gt;&lt;BR /&gt; &amp;lt;Departement&amp;gt;CUAC&amp;lt;/Departement&amp;gt;&lt;BR /&gt; &amp;lt;Domein___Domaine&amp;gt;DC&amp;lt;/Domein___Domaine&amp;gt;&lt;BR /&gt; &amp;lt;Info_type&amp;gt;Brief - Lettre&amp;lt;/Info_type&amp;gt;&lt;BR /&gt; &amp;lt;Medewerker___Collaborateur&amp;gt;Alain Terrieur&amp;lt;/Medewerker___Collaborateur&amp;gt;&lt;BR /&gt; &amp;lt;Status___Statut&amp;gt;5 - Overgedragen - Transféré&amp;lt;/Status___Statut&amp;gt;&lt;BR /&gt; &amp;lt;/Document&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/DocumentSet&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I just can't seem to get the &amp;lt;Info_type&amp;gt; Value!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frustrating!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 07:53:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52895#M19840</guid>
      <dc:creator>nimbus1958</dc:creator>
      <dc:date>2018-10-17T07:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: I have a document uploaded to a folder along an XML file.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52896#M19841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;docXml&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DocumentSet‍&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Info_type‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 09:36:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52896#M19841</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2018-10-17T09:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: I have a document uploaded to a folder along an XML file.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52897#M19842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Angel, That is what I thought also but ... no luck!&lt;/P&gt;&lt;P&gt;This is taken to its most basic, following your advice and documentation!&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var docXml = new XML(document.content);&lt;BR /&gt;var infoType = docXml.DocumentSet.Document.Info_type;&lt;BR /&gt;document.properties.title = infoType;&lt;BR /&gt;document.save();&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Drowing in frustration!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 10:09:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52897#M19842</guid>
      <dc:creator>nimbus1958</dc:creator>
      <dc:date>2018-10-17T10:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: I have a document uploaded to a folder along an XML file.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52898#M19843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; docString &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;docString&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;startsWith&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"&amp;lt;?xml"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;docString &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; docString&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;split&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"\n"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;slice&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;join&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"\n"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; docXml &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;XML&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;docString&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; infoType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; docXml&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DocumentSet&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Info_type&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;logger&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;docXml&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Info_type&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&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;/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;P&gt;&lt;/P&gt;&lt;P&gt;... you can change / improve it, as it's a quick PoC.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 12:59:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52898#M19843</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2018-10-17T12:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: I have a document uploaded to a folder along an XML file.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52899#M19844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;Thanks Angel but I have no results. I even tried to change the name of the document but nothing. It is as if the variable was not populated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;I will give it a shot tomorrow on another Alfresco instance in the office and follow your proposition. I’ll let you know the results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;I really appreciate your time and help.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 13:24:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52899#M19844</guid>
      <dc:creator>nimbus1958</dc:creator>
      <dc:date>2018-10-17T13:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: I have a document uploaded to a folder along an XML file.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52900#M19845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like I included a&amp;nbsp;bad sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMO, the main problem is that you have to omit "DocumentSet" when recovering values from XML.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This &lt;STRONG&gt;doesn't&lt;/STRONG&gt;&amp;nbsp;work...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background-color: #f5f2f0; border: 0px; font-size: 14px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;docXml&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;DocumentSet&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;Document&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;Info_type&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... but this &lt;STRONG&gt;works&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background-color: #f5f2f0; border: 0px; font-size: 14px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;docXml&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;Document&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;Info_type&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 13:45:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52900#M19845</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2018-10-17T13:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: I have a document uploaded to a folder along an XML file.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52901#M19846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Angel, It works!&lt;/P&gt;&lt;P&gt;Big thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 04:51:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-document-uploaded-to-a-folder-along-an-xml-file/m-p/52901#M19846</guid>
      <dc:creator>nimbus1958</dc:creator>
      <dc:date>2018-10-18T04:51:57Z</dc:date>
    </item>
  </channel>
</rss>

