I\'m reading an xaml file using XamlReader()
and it has of course elements and attributes such as:
The MSDN docs show using an XmlReader as input to XamlReader
// Load the button
StringReader stringReader = new StringReader(savedButton);
XmlReader xmlReader = XmlReader.Create(stringReader);
Button readerLoadButton = (Button)XamlReader.Load(xmlReader);
http://msdn.microsoft.com/en-us/library/system.windows.markup.xamlreader.aspx
You could just use the XmlReader to grab attributes.
http://msdn.microsoft.com/en-us/library/cc189056%28VS.95%29.aspx
You would use XmlNodeType.Attribute
in the switch
statement shown in the MSDN example, after first noting the node you're in in the XmlNodeType.Element
case.