wpf - How to load an xml string in the code behind to databound UI controls that bind to the XPath of the XML? -


every sample have seen uses static xml in xmldataprovider source, used databind ui controls using xpath binding. idea edit dynamic xml (structure known developer during coding), using wpf ui.

has found way load dynamic xml string (for example load file during runtime), use xml string xmldataprovider source?

code snippets great.

update: make more clear, let's want load xml string received web service call. know structure of xml. databind wpf ui controls on wpf window. how make work? samples on web, define whole xml inside xaml code in xmldataprovider node. not looking for. want use xml string in codebehind databound ui controls.

here code used load xml file disk , bind treeview. removed of normal tests conciseness. xml in example opml file.

xmldataprovider provider = new xmldataprovider();  if (provider != null) {   system.xml.xmldocument doc = new system.xml.xmldocument();   doc.load(filename);   provider.document = doc;   provider.xpath = "/opml/body/outline";   feedlisttreeview.datacontext = provider; } 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -