VS2010 doesn't come with inbuilt snippet editor but here is an excellent alternative
http://snippeteditor.codeplex.com/
A journey through the software development world can be interesting, exciting and quite daunting and Id like to share my own such experiences here.
Monday, March 21, 2011
Thursday, March 03, 2011
Here is a quick reference on using XDocument
Here is a quick reference on using XDocument
5
1) Loading an XML file into a Xdocument object
XDocument xdocSource = XDocument.Parse(Xmltmp);
2) Loading a string directly into a Xdocument object
XDocument xdocSource = XDocument.Load(XMLReader xr);
3) To get to a particular element you need to follow the path
XmlElement xe = xdocSource.Descendants(soap + "JobDetails").FirstOrDefault().Element(soap + "JobNumber");
4) To get the value of the above use the following
string tmp = xdocSource.Descendants(soap + "JobDetails").FirstOrDefault().Element(soap + "JobNumber").Value;
CodeProject
1) Loading an XML file into a Xdocument object
XDocument xdocSource = XDocument.Parse(Xmltmp);
2) Loading a string directly into a Xdocument object
XDocument xdocSource = XDocument.Load(XMLReader xr);
3) To get to a particular element you need to follow the path
XmlElement xe = xdocSource.Descendants(soap + "JobDetails").FirstOrDefault().Element(soap + "JobNumber");
4) To get the value of the above use the following
string tmp = xdocSource.Descendants(soap + "JobDetails").FirstOrDefault().Element(soap + "JobNumber").Value;
CodeProject
Subscribe to:
Posts (Atom)