soso blake

soso blake

  • NA
  • 3
  • 3.9k

How to Find XMLNode Name

Feb 23 2011 2:05 PM

Hy everybody

Is there a way to get the node name knowing only a part of it, I have multiple xml's but the node name is with different cases, for example one of it has the nodename "Price" and the other price>

XmlDocument xmldoc = new XmlDocument(); xmldoc.Load("prices.xml"); XmlNodeList price = xmldoc.GetElementsByTagName("Price"); string getprice = (price[0].InnerText); 

Is there a way to make this case insensitive or to use wildcards with the tag name xmldoc.GetElementsByTagName("*ice");

Then I want to convert the value to a string.

Thank you very much for your time.


Answers (3)