ReadInnerXml() public method

Reads all the content, including markup, as a string.
public ReadInnerXml ( ) : string
return string
Esempio n. 1
0
        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());
            }
        }
Esempio n. 2
0
 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());
         }
     }
 }