I am searching for a way to convert a XML-Object to string.
Is there a way like $xml.toString() in Powershell?
I am searching for a way to convert a XML-Object to string.
Is there a way like $xml.toString() in Powershell?
You are probably looking for OuterXml
.
$xml.OuterXml
should give you what you want.
How are you creating the XML object?
Typically, if you want an XML string from an object, you'd use:
$object | ConvertTo-Xml -As String