Exemplo n.º 1
0
        public virtual void testParseNoNS()
        {
            XMLDoc d  = new XMLDoc("TEST", null);
            string fn = sm_dirTestDataTemp + "testParseNoNS.xml";

            d.write2File(fn, 2, true);
            JDFParser p    = new JDFParser();
            JDFDoc    d2   = p.parseFile(fn);
            KElement  root = d2.getRoot();

            // Assert.IsNull(root.getNamespaceURI());
            Assert.IsFalse(d2.ToString().IndexOf("xmlns=\"\"") >= 0);
            Assert.IsFalse(d.ToString().IndexOf("xmlns=\"\"") >= 0);
            Assert.IsFalse(root.ToString().IndexOf("xmlns=\"\"") >= 0);
            KElement foo = root.appendElement("foofoo");

            Assert.IsNull(foo.getNamespaceURI() == "" ? null : "");
        }