C# and XML

C

C# newbie

Hey guys,

I've a method as below, which searches for some text or strings into an XML
file. I pass an XPath query like:
//*[contains(.,"Smith")]


Which works fine! the problem: It only finds Smith not "smith" or "SmItH".
I know there is an xml translate function but don't know how to use it.
Please help me out with this that how can I find any string or text
regardless of case sensitive limitations in xml.

foreach (XmlNode xnode in node.SelectNodes(txtPattern.Text,nsmgr))
{

ListViewItem lvi = new ListViewItem(xnode.Name);

lvi.Tag = new TreeAndXmlNode(FindTreeNode(XmlTree.Nodes[0], xnode), xnode);


txtLeaf.Text = xnode.InnerText;



lvResult.Items.Add(lvi);

}



Thanks in advnace

C# NewBie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top