Loading internal text file as XML

主宰稳场 提交于 2019-12-04 04:33:23

问题


I'm writing a VB.NET app where I want to load an internal text file from Resource.

But the code shows Invalid URI: The Uri string is too long.

The code is

'document.Load("C:\Users\Sou\Documents\Visual Studio 2010\Projects\info.xml")
document.Load(My.Resources.info)
'some processing job with XML node ...

So, how to load the resource file ?


回答1:


Dim xdc As New XmlDocument
xdc.LoadXml(My.Resources.info)
MsgBox(xdc.OuterXml)


来源:https://stackoverflow.com/questions/10845457/loading-internal-text-file-as-xml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!