I'm using an xmlreader to parse a valid xml file. I start reading and have an if statement like so:
if (reader.IsStartElement())
{
// Code needed here
How do I grab just the name of that start element?
You can just check the value of reader.Name
if (reader.IsStartElement())
{
if (reader.Name == "settings")
{
//do stuff
But as the others suggested, you might want to read more documentation about XmlReader, and perhaps even think about simply parsing the full xml document with XDocument etc.
XmlReader? And I suggest you look at the "Related questions" on the right. And this is not ASP Classic.