Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Editing a serialized object with Powershell

$
0
0

I have an xml document (actually a NWF file) that has a node which contains a serialized object. It is xml but all less-than-signs have been changed to  "<" and the same for greater-than-signs, ampersands and other symbols.

I need to read this field into a 'proper' xml format so that I can traverse it and update some values in it.

My first attempt was to read it into a variable as a string and use Replace to reformate the symbols. But since this field has an xml declaration, when I cast the newly cleaned string as xml it failed.

It also seems pretty clunky. Is this possible to do in PowerShell? Should I use c# instead? I will be doing this process on about a dozen files periodically. Not high volume but will need to run on a production server.


Love them all...regardless. - Buddha



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>