//Arquivo de exemplo: GetAttribute.aspx.cs
using System.Xml;
using System;

public partial class GetAttribute : System.Web.UI.Page {
	protected void Page_Load(object sender, EventArgs e) {
		using (XmlReader r = XmlReader.Create(@"C:\Livro\Capitulo22\revistas.xml")) {
			while (r.Read()) {
				if (r.MoveToContent() == XmlNodeType.Element) {
					if (r.HasAttributes) {
						for (int i = 0; i < r.AttributeCount; i++) {
							Response.Write(r.GetAttribute(i) + "<br/>");
}}}}}}}
