public void Test_MoveToNextAttribute() { // Make sure we can do MoveToElement after reading multiple attributes. var r = new SgmlReader { InputStream = new StringReader("<test id='10' x='20'><a/><!--comment-->test</test>") }; Assert.IsTrue(r.Read()); while(r.MoveToNextAttribute()) { _log.Debug(r.Name); } if(r.MoveToElement()) { _log.Debug(r.ReadInnerXml()); } }
void RegressionTest1() { // Make sure we can do MoveToElement after reading multiple attributes. SgmlReader r = new SgmlReader(); r.InputStream = new StringReader("<test id='10' x='20'><a/><!--comment-->test</test>"); if (r.Read()) { while (r.MoveToNextAttribute()) { Trace.WriteLine(r.Name); } if (r.MoveToElement()) { Trace.WriteLine(r.ReadInnerXml()); } } }