在 Silverlight 中使用 XElement 读取 XML
谁能指导我如何在 Silverlight (C#) 中使用 XElement 来读取 XML 文件。
谢谢你!
Can anyone please guide me on how to use XElement in Silverlight (C#) to read an XML file.
Thank You!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一些示例代码:
Here's some example code:
您可以使用静态 XElement.Load 方法加载 XML,例如从文件流或直接从打包到 .XAP 的 XML 文件加载。
这是一个例子:
链接文本
XElement 上的 MSDN 页面也可能会有所帮助( Google:silverlight XElement 类)。
干杯,亚历克斯
you can use the static XElement.Load method to load XML e.g. from a file stream or directly from an XML file packaged into the .XAP.
Here's an example:
link text
The MSDN page on XElement might also be helpful (Google: silverlight XElement class).
Cheers, Alex