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

Get self closing tag through xpath in xml file in c#

$
0
0

Can you please tell me how to get this

my code: var varSearchTerm2 = from x in xDocFile.XPath2SelectElements("//xref[not(node())][not(@*)]") select x;`

Input :

<xref/>
<xref></xref>
<xref></xref>

my output look like this:

<xref/>


Viewing all articles
Browse latest Browse all 935

Trending Articles



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