System.Xml.Tests.TCWriteNode_XmlReader.writeNode_XmlReader37 C# (CSharp) Méthode

writeNode_XmlReader37() public méthode

public writeNode_XmlReader37 ( ) : int
Résultat int
        public int writeNode_XmlReader37()
        {
            string strxml = "<!DOCTYPE root PUBLIC \"\" \"#\"><root/>";
            string exp = (WriterType == WriterType.UTF8WriterIndent || WriterType == WriterType.UnicodeWriterIndent) ?
               "<!DOCTYPE root PUBLIC \"\" \"#\"[]>" + nl + "<root />" :
               "<!DOCTYPE root PUBLIC \"\" \"#\"[]><root />";
            try
            {
                XmlReader xr = CreateReader(new StringReader(strxml));
                using (XmlWriter w = CreateWriter())
                {
                    while (!xr.EOF)
                    {
                        w.WriteNode(xr, (bool)CurVariation.Param);
                    }
                    xr.Dispose();
                }
            }
            catch (FileNotFoundException e) { CError.WriteLine(e); return TEST_PASS; }
            catch (XmlException e) { CError.WriteLine(e); return TEST_PASS; }
            return TEST_FAIL;
        }