My xml file has something like this:
...
<Keyword name = "if" />
<Keyword name = "else" />
<Keyword name = "is" />
...
So how can I recursively get all of the values of the name attribute and add them to a List<string> or string[]. Maybe a foreach loop?
I followed codemeit's and I keep getting an error:Data at the root level is invalid. Line 1, position 1. My xml file is
<KeyWords>
...
<KeyWord name = "if" />
...
</KeyWord>
New problem The '\' character, hexadecimal value 0x5C, cannot be included in a name. but the same file.