public int attribute_20() { using (XmlWriter w = CreateWriter()) { w.WriteStartElement("Root"); w.WriteAttributeString("a", null, "< > &"); w.WriteEndElement(); } return CompareReader("<Root a=\"< > &\" />") ? TEST_PASS : TEST_FAIL; }