Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Unable to get elements using XPathSelectElements

$
0
0

Hi,

I have the Xelement as follows.

<root type="object"><meta type="object"><disclaimer type="string">XXXXX</disclaimer><license type="string">http://open.fda.gov/license</license><last_updated type="string">2015-05-31</last_updated></meta><results type="array"><item type="object"><term type="string">Oxygen</term><count type="number">397</count></item><item type="object"><term type="string">Ibuprofen</term><count type="number">301</count></item></results></root>
  IEnumerable<XElement> data = XRoot.XPathSelectElements("/root/results/item/term");

I have tried the above code, to get the array of term element. But i am getting null as the result. I am pretty much sure, that the XPath is correct. But, still i am unable to get.

May i kindly know, whether i am missing something or where i am mistaking???

Thanks in advance.


NANDAKUMAR.T


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>