上传xml文件并阅读 [英] upload xml file and read

查看:72
本文介绍了上传xml文件并阅读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从本地pc上传xml文件并读取文件??

How to upload xml file from local pc and read the file ??

推荐答案

如果是你的桌面应用程序那么你只需要为它创建一个XmlReader文件,它会将您的文件加载到内存中,并使该文件可读。之后,您只需要读取/解析该文件。请访问以下链接以获取帮助( http://www.dotnetperls.com/xmlreader [ ^ ]



如果你想读XML使用基于Web的应用程序的文件,并且您希望用户上传该文件,然后首先应该为用户提供将文件上载到Web服务器的选项。一旦文件可用,您可以以相同的方式阅读它,但是在这种情况下你应该检查那个XML文件的模式验证。

希望你有关于该做什么的基本想法:)
If it is your desktop application then you just need to create an XmlReader for that file and it will load your file into memory and will make that file readable to you. After that you just need to read/parse that file. Go through the following link for help (http://www.dotnetperls.com/xmlreader[^]

If you want to read an XML file using a web-based application, and you want the user to upload that file, then first you should provide the user the option to upload the file to the web-server. Once file is available, you can read it the same way, but in that case you should check for the the schema validation of that XML file.
Hope you have got the basic idea about what to do :)


这篇关于上传xml文件并阅读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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