c# - How to read sql XML field in .Net -


in .net, dataset contains field following xml data in it. ran script in sql generate xml data need read in .net (c# or vb.net)

  <candidate>     <inspector inspectorid="6390" name="john doe">       <qualification>         <qualification docid="23107" filesize="248724" name="aws cwi" enddate="2016-12-01t00:00:00" datecreated="2014-07-23t21:30:00" />       </qualification>     </inspector>     <inspector inspectorid="6564" name="jane roe">       <qualification>         <qualification docid="25183" filesize="48114" name="cswip 3.1 welding (or equiv)" enddate="2015-11-01t00:00:00" datecreated="2014-08-27t12:47:00" />         <qualification docid="25185" filesize="449518" name="rt level ii" enddate="2017-12-17t00:00:00" datecreated="2014-08-27t12:52:00" />         <qualification docid="25186" filesize="156923" name="ut level ii" enddate="2018-01-28t00:00:00" datecreated="2014-08-27t12:54:00" />       </qualification>     </inspector>   </candidate> 

i trying read data inspector not working.

    dim doc new xmldocument()     dim nodes xmlnodelist     doc.loadxml(textbox1.text)     nodes = doc.selectnodes("/candidate/inspector/qualification/qualification[@inspectorid=" & 6390 & "]")     dim node xmlnode     each node in nodes         msgbox(node.selectsinglenode("docid").innertext)         msgbox(node.selectsinglenode("name").innertext)         msgbox(node.selectsinglenode("filesize").innertext)     next 


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -