How to read an xml file using Silverlight using c#? -


i trying figure out if there way read xml file (like c:\test.xml) in silverlight application? want read xml file xmldocument. help? have text box read xml file path. want read xml xmldocument

as link russ provided mentions, can't directly access file on hard drive silverlight. typically need use openfiledialog retrieve file stream. if silverlight application out-of-browser application elevated permissions have access user's documents folder.

also, xmldocument not available in silverlight. you'll want use xdocument class, newer way work xml in latest versions of .net.

here's example of using xdocument, in relation xmldocument: http://blogs.msdn.com/b/xmlteam/archive/2009/03/31/converting-from-xmldocument-to-xdocument.aspx

msdn docs on xdocument: http://msdn.microsoft.com/en-us/library/system.xml.linq.xdocument(v=vs.95).aspx


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -