My xml section is like this:
<Note>
<SpecialText att1="" />
</Note>
Or
<Note>
This is a note.
</Note>
What I need is to use XmlReader to read the xml, but I am not sure how to determine if the innerXml is another xmlelement or is just text.
I am doing this:
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element)
{
switch (reader.LocalName.ToLower())
{
case MMLElement.SpecialText:
//// read related attributes
break;
}
}
}
but how can I read the content if the thing under the Note is just text. If I use reader.ReadInnerXml, it will read everything, so I won't have chance to see if it is a SpecialText XmlElement or just text?
Many Thanks