Powershell:将XML转换为字符串 [英] Powershell: Convert XML to String

查看:175
本文介绍了Powershell:将XML转换为字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种将XML对象转换为字符串的方法。

I am searching for a way to convert a XML-Object to string.

在Powershell中有像$ xml.toString()这样的方法吗?

Is there a way like $xml.toString() in Powershell?

推荐答案

您可能正在寻找 OuterXml

$ xml.OuterXml 应该会给您想要的东西。

$xml.OuterXml should give you what you want.

这篇关于Powershell:将XML转换为字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆