简体   繁体   中英

Loading internal text file as XML

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 ?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM