GetElementsByTagName() function to be case insensitive

  • Thread starter Thread starter Nikhil Ekke
  • Start date Start date
N

Nikhil Ekke

Hi,

I am parsing an XML file.
I am using the function GetElementsByTagName() function.
But I want this function to give me the XMLNodeList which is case
insensitive.

Suppose there r nodes like this
<time/>
<Time/>
<TimE/>

it shd return all of the above.
Can somebody pl. help me

Regards,
Nikhil
 
Hi,

I don't think your problem will be solved.

An object of XMLDocument is performing GetElementsByTagName() by
passing XPath Query to XML Document. Now this XPath is by default not
casesensitive.

Thanks
Rushi
 
Nikhil Ekke said:
Hi,

I am parsing an XML file.
I am using the function GetElementsByTagName() function.
But I want this function to give me the XMLNodeList which is case
insensitive.

Suppose there r nodes like this
<time/>
<Time/>
<TimE/>

it shd return all of the above.
Can somebody pl. help me

You can't.

Use System.Text.RegularExpressions.Regex.Replace() to do a case
insensitive search and replace on the raw xml string. Then load it into
an XMLDocument.
 
Back
Top