的XmlElement字符串转换 [英] XmlElement to string conversion

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

问题描述

有将一些简单的方法的XmlElement 字符串

Is there some simple way to convert XmlElement to string ?

感谢。

推荐答案

这将得到元素的内容,如果内容是文本:

This will get the content of the element if the content is text:

element.Value

这会得到元素的含量为XML:

This will get the content of the element as XML:

element.InnerXml

这将得到元素和它的XML内容

This will get the element and its content as XML

element.OuterXml

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

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