<?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 Convert Collection to XML in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65632#M18237</link>
    <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;Just wondering if anyone has come across a solution of converting a collection to XML.&lt;BR /&gt;&lt;BR /&gt;XML is to be then used by a SOAP API.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Similarly and not sure if this is even the best way but has anyone encountered a solution where it converts a json directly to an xml file for API consumption?&lt;BR /&gt;&lt;BR /&gt;Looking forward to your inputs!&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Brian&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Brianne Gacad&lt;BR /&gt;Senior IT Domain Specialist&lt;BR /&gt;Telstra&lt;BR /&gt;Australia/Melbourne&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Fri, 30 Aug 2019 07:18:00 GMT</pubDate>
    <dc:creator>BrianneGacad</dc:creator>
    <dc:date>2019-08-30T07:18:00Z</dc:date>
    <item>
      <title>Convert Collection to XML</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65632#M18237</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;Just wondering if anyone has come across a solution of converting a collection to XML.&lt;BR /&gt;&lt;BR /&gt;XML is to be then used by a SOAP API.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Similarly and not sure if this is even the best way but has anyone encountered a solution where it converts a json directly to an xml file for API consumption?&lt;BR /&gt;&lt;BR /&gt;Looking forward to your inputs!&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Brian&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Brianne Gacad&lt;BR /&gt;Senior IT Domain Specialist&lt;BR /&gt;Telstra&lt;BR /&gt;Australia/Melbourne&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Aug 2019 07:18:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65632#M18237</guid>
      <dc:creator>BrianneGacad</dc:creator>
      <dc:date>2019-08-30T07:18:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Collection to XML</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65633#M18238</link>
      <description>Hi Brianne - if you push the collection into a code stage as an input parameter, you can treat it as a DataTable object, and there will be plenty of conversion examples to borrow from. That said, debugging code in BP can be painful because the code stage is not an IDE, really it's just an execution mechanism. So for anything non-trivial, use a true code editor to get the code right before pasting into BP.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;John Carter&lt;BR /&gt;Professional Services&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Aug 2019 08:18:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65633#M18238</guid>
      <dc:creator>John__Carter</dc:creator>
      <dc:date>2019-08-30T08:18:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Collection to XML</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65634#M18239</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I posted the same to other question, maybe it'll work for you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can loop over the collection and use a multicalc to generate the desired XML.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;OR you can use code stage with&amp;nbsp;collInput (collection) as input and&amp;nbsp;xmlResult (text) as output.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="language-markup"&gt;Dim sw as Object
sw = new StringWriter() 
collInput.WriteXml(sw)
xmlResult = sw.ToString()​​&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Gopal Bhaire&lt;BR /&gt;Analyst&lt;BR /&gt;Accenture&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Sat, 31 Aug 2019 10:50:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65634#M18239</guid>
      <dc:creator>GopalBhaire</dc:creator>
      <dc:date>2019-08-31T10:50:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Collection to XML</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65635#M18240</link>
      <description>Hi Gopal,&lt;BR /&gt;Had the same question and tried your solution above but encountered this error:&lt;BR /&gt;&lt;BR /&gt;Page: Action 1&lt;BR /&gt;Stage: Code1&lt;BR /&gt;Type: Error&lt;BR /&gt;Action: Validate&lt;BR /&gt;Description: Compiler error at line 2: Type 'StringWriter' is not defined.&lt;BR /&gt;Repairable: No&lt;BR /&gt;&lt;BR /&gt;Any idea what the cause and fix is?&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Bwalya Kasase&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Mar 2021 09:57:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65635#M18240</guid>
      <dc:creator>BwalyaKasase</dc:creator>
      <dc:date>2021-03-12T09:57:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Collection to XML</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65636#M18241</link>
      <description>Hi Bwalya try changing the line to this.&lt;BR /&gt;&lt;BR /&gt;sw = new &lt;STRONG&gt;System.IO.&lt;/STRONG&gt;StringWriter&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;John Carter&lt;BR /&gt;Professional Services&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Mar 2021 14:13:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65636#M18241</guid>
      <dc:creator>John__Carter</dc:creator>
      <dc:date>2021-03-12T14:13:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Collection to XML</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65637#M18242</link>
      <description>Hi Bwalya,&lt;BR /&gt;&lt;BR /&gt;maybe you have forgotten to import the namespace "System.IO"? Or easier replace "StringWriter" with "System.IO.StringWriter"&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Tobias Arnold&lt;BR /&gt;RPA Developer&lt;BR /&gt;ITERGO GmbH&lt;BR /&gt;Europe/Duesseldorf&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Mar 2021 14:16:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65637#M18242</guid>
      <dc:creator>TobiasArnold</dc:creator>
      <dc:date>2021-03-12T14:16:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Collection to XML</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65638#M18243</link>
      <description>dt.WriteXml would output xml, but you mention that you need to feed it to soap api later, you can't just convert it to any xml and expect it to work. &lt;BR /&gt;You need to send xml that service expects to get, which is described in wsdl. You can probably use SoapUI to get a "template", then fill it from your collection in a loop.​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Andrey Kudinov&lt;BR /&gt;Project Manager&lt;BR /&gt;MobileTelesystems PJSC&lt;BR /&gt;Europe/Moscow&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Mar 2021 23:49:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Collection-to-XML/m-p/65638#M18243</guid>
      <dc:creator>AndreyKudinov</dc:creator>
      <dc:date>2021-03-12T23:49:00Z</dc:date>
    </item>
  </channel>
</rss>

