public int writeAttributes_13()
{
string strxml = "<E a=\"><"'&\" />";
using (XmlReader xr = CreateReader(new StringReader(strxml)))
{
xr.Read();
xr.MoveToFirstAttribute();
if (xr.NodeType != XmlNodeType.Attribute)
{
CError.WriteLine("Reader positioned on {0}", xr.NodeType.ToString());
xr.Dispose();
return TEST_FAIL;
}
using (XmlWriter w = CreateWriter())
{
w.WriteStartElement("Root");
w.WriteAttributes(xr, false);
w.WriteEndElement();
}
}
return CompareReader("<Root a=\"><"'&\" />") ? TEST_PASS : TEST_FAIL;
}