Mono.TextEditor.Highlighting.SyntaxModeService.Scan C# (CSharp) Method

Scan() static private method

static private Scan ( Stream stream, string attribute ) : string
stream Stream
attribute string
return string
		static string Scan (Stream stream, string attribute)
		{
			try {
				var reader = XmlReader.Create (stream);
				while (reader.Read () && !reader.IsStartElement ()) 
					;
				return reader.GetAttribute (attribute);
			} catch (Exception e) {
				Console.WriteLine ("Error while scanning xml:");
				Console.WriteLine (e);
				return null;
			}
		}