c# - How to read XML using Linq with Nested Descendants -


How to read the elements of nested clan in LINQ

My XML file format pre & lt; & Lt; PpProperties & gt; & Lt; Name of the project = "CEESI all 2" date = "2013-11-18T16: 48: 54.9452592 + 01: 00" Revised Date = "2013-11-18T16: 48: 57.2413905 + 01: 00" & gt; & Lt; NuclearSystem & gt; Barium & lt; / NuclearSystem & gt; & Lt; Timeline and gt; & Lt; Clip & gt; & Lt; FilePathFP & gt; FPS \ FP001D \ default-wp000-15Oct2012-105001.vxbin & lt; / FilePathFP & gt; & Lt; / Clips & gt; & Lt; / Time period and gt; & Lt; / Project & gt; & Lt; / PpProperties & gt; & Lt; / SmPpProperties & gt; I am trying to use PpProperties in the form of C # code

  var SMPpProperties = xmldoc   

Select Descendants ("PpProperties") New {Project in Xmldoc.Descendants ("Project") New {* How to proceed *

  var SMPPProperties = xmldoc.Descendants ("project"), filePath = poj.Element (" Timeline ") Choose Element (" Clip "). Element ("FilePathFP") value}. Foreach (var items in SMPpProperties) {Console.WriteLine ("name = {0}, file path = {1}", item.name, item.filePath); }    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -