<?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 file to XMLPersistedObject in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/convert-file-to-xmlpersistedobject/m-p/139878#M8084</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, so I have a Mosaic Dataset that has an Attribute Table Function added to it (the attribute table is a dbf that contains Category names along with Red, Green, Blue values).&amp;nbsp; I exported the function as a template (rft.xml) file with the intention of using it when programmatically creating other Mosaic Datasets and using it in the arcpy.EditRasterFunction_management call.&amp;nbsp; I thought it'd be as simple as changing the dbf file name within the template to the correct dbf before making the arcpy.EditRasterFunction_management call.&amp;nbsp; Turns out it's not that simple.&amp;nbsp; The dbf file name is nowhere to be found in the template.&amp;nbsp; Instead I see this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;Value xsi:type='typens:XMLPersistedObject'&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;Bytes&amp;gt;sT14Bu7l0RGwogAA+HgIIAAAAAABACgAAAB0AGUAcwB0AEwAQQBOAEQARgBJAFIARQAuADEAMgAw&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AEUAVgBIAAAAAgAAAAAAGAAAAGQAQgBBAFMARQAgAFQAYQBiAGwAZQAAABEANVpx49ERqoIAwE+j&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OhUBAAAAAQA8AAAARAA6AFwAaQBzAF8AcwBlAHIAdgBlAHIAXwBjAG8AbgBmAGkAZwBcAGUAeABw&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AG8AcgB0AFwATQBEAAAAAgAAAAAAHgAAAFMAaABhAHAAZQBmAGkAbABlACAARABhAHQAYQAAABFa&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;jlib0NERqnwAwE+jOhUCAAAAAQABAAAAEgAAAEQAQQBUAEEAQgBBAFMARQAAAAgAPAAAAEQAOgBc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AGkAcwBfAHMAZQByAHYAZQByAF8AYwBvAG4AZgBpAGcAXABlAHgAcABvAHIAdABcAE0ARAAAAAGW&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;22qgXNnREaqBAMBPozoVAAAAAA==&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/Bytes&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/Value&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've determined that the above value does contain the dbf file name and that it's a serialized file object of some type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know how to get from a file name such as "D:\dbfs\test.dbf" to that XMLPersistedObject data above, though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Would somebody provide me some C# code or Python code for doing that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On a side note I exported the template for the Colormap Function and it stores the clr file name as a regular old text string like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;Value xsi:type='xs:string'&amp;gt;D:\services_mosaicdatasets\dbfs\Image.clr&amp;lt;/Value&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which is what I expected of the Attribute Table Function template.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I appreciate any help you might provide.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Apr 2014 15:45:40 GMT</pubDate>
    <dc:creator>todddoerr</dc:creator>
    <dc:date>2014-04-21T15:45:40Z</dc:date>
    <item>
      <title>convert file to XMLPersistedObject</title>
      <link>https://community.esri.com/t5/data-management-questions/convert-file-to-xmlpersistedobject/m-p/139878#M8084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, so I have a Mosaic Dataset that has an Attribute Table Function added to it (the attribute table is a dbf that contains Category names along with Red, Green, Blue values).&amp;nbsp; I exported the function as a template (rft.xml) file with the intention of using it when programmatically creating other Mosaic Datasets and using it in the arcpy.EditRasterFunction_management call.&amp;nbsp; I thought it'd be as simple as changing the dbf file name within the template to the correct dbf before making the arcpy.EditRasterFunction_management call.&amp;nbsp; Turns out it's not that simple.&amp;nbsp; The dbf file name is nowhere to be found in the template.&amp;nbsp; Instead I see this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;Value xsi:type='typens:XMLPersistedObject'&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;Bytes&amp;gt;sT14Bu7l0RGwogAA+HgIIAAAAAABACgAAAB0AGUAcwB0AEwAQQBOAEQARgBJAFIARQAuADEAMgAw&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AEUAVgBIAAAAAgAAAAAAGAAAAGQAQgBBAFMARQAgAFQAYQBiAGwAZQAAABEANVpx49ERqoIAwE+j&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OhUBAAAAAQA8AAAARAA6AFwAaQBzAF8AcwBlAHIAdgBlAHIAXwBjAG8AbgBmAGkAZwBcAGUAeABw&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AG8AcgB0AFwATQBEAAAAAgAAAAAAHgAAAFMAaABhAHAAZQBmAGkAbABlACAARABhAHQAYQAAABFa&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;jlib0NERqnwAwE+jOhUCAAAAAQABAAAAEgAAAEQAQQBUAEEAQgBBAFMARQAAAAgAPAAAAEQAOgBc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AGkAcwBfAHMAZQByAHYAZQByAF8AYwBvAG4AZgBpAGcAXABlAHgAcABvAHIAdABcAE0ARAAAAAGW&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;22qgXNnREaqBAMBPozoVAAAAAA==&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/Bytes&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/Value&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've determined that the above value does contain the dbf file name and that it's a serialized file object of some type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know how to get from a file name such as "D:\dbfs\test.dbf" to that XMLPersistedObject data above, though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Would somebody provide me some C# code or Python code for doing that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On a side note I exported the template for the Colormap Function and it stores the clr file name as a regular old text string like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;Value xsi:type='xs:string'&amp;gt;D:\services_mosaicdatasets\dbfs\Image.clr&amp;lt;/Value&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which is what I expected of the Attribute Table Function template.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I appreciate any help you might provide.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2014 15:45:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/convert-file-to-xmlpersistedobject/m-p/139878#M8084</guid>
      <dc:creator>todddoerr</dc:creator>
      <dc:date>2014-04-21T15:45:40Z</dc:date>
    </item>
  </channel>
</rss>

