Geeks With Blogs

News
Employers
Soppa Group India
iSmart Panache Inc
R Systems Internationals Ltd
Technovate eSolutions Pvt Ltd
The contents of this blog are my personal opinion and do not represent in any way the view of my employer.
These postings are provided "AS IS" with no warranties, and confer no rights.

Google PR™ - Post your Page Rank with MyGooglePageRank.com

Narendra Tiwari

XML is case sensitive hence Xml parser (XmlDocument) too...
In below example I am trying to search the <user> element node with name attibute as 'pupu'.

 <user name="PuPu" fullname="Priyanka T" email="pupu.t@pupusworld.com" />

::translate() functon esures the case insensitive comparision in Xpath expression.

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("<xml file to load>");
XmlElement userElement = (XmlElement)xmlDoc.DocumentElement.SelectSingleNode("//user[translate(@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') ='pupu']");

 

Posted on Tuesday, March 23, 2010 10:53 AM .Net | Back to top


Comments on this post: XML is case sensitive hence Xml parser (XmlDocument) too...

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Narendra Tiwari | Powered by: GeeksWithBlogs.net