如何为xml文本阅读器提供返回类型 [英] how to give return type for xml text reader

查看:112
本文介绍了如何为xml文本阅读器提供返回类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经习惯了xml文本阅读器从xml读取值,我想从xml文本阅读器返回值,我不知道如何给这个返回类型告诉任何人.

解决方案

对于Microsoft .NET Framework 2.0版,Microsoft MSDN建议使用XmlReader而不是XmlTextReader.

MSDN注意-"在Microsoft .NET Framework 2.0版中,建议的做法是使用System.Xml.XmlReader.Create方法创建XmlReader实例.这使您可以充分利用版本中引入的新功能.有关更多信息,请参见创建XML读取器."

请查看以下链接以获取更多信息.

XmlTextReader类

XmlReader类

常见的XmlReader任务


i have used to xml text reader to read the value from xml i want to return the value from xml text reader i dont know how to give the return type for this any one tell me.

解决方案

Microsoft MSDN recommends XmlReader instead of XmlTextReader for Microsoft .NET Framework version 2.0.

MSDN Note - "In the Microsoft .NET Framework version 2.0 release, the recommended practice is to create XmlReader instances using the System.Xml.XmlReader.Create method. This allows you to take full advantage of the new features introduced in this release. For more information, see Creating XML Readers."

Have a look at below links for more information.

XmlTextReader Class

XmlReader Class

Common XmlReader Tasks


这篇关于如何为xml文本阅读器提供返回类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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