コード例 #1
0
        public virtual void FieldNullValueUnitTest()
        {
            XmlDocument document = XfdfFileUtils.CreateNewXfdfDocument();
            XmlElement  fields   = document.CreateElement("fields");

            document.AppendChild(fields);
            FieldObject fieldObject = new FieldObject();

            fieldObject.SetName("testname");
            IList <FieldObject> fieldList = new List <FieldObject>();

            XfdfWriter.AddField(fieldObject, fields, document, fieldList);
            XmlNode childOfFields = fields.FirstChild;

            NUnit.Framework.Assert.IsNotNull(childOfFields);
            NUnit.Framework.Assert.IsNull(childOfFields.FirstChild);
        }
コード例 #2
0
        /// <exception cref="Javax.Xml.Transform.TransformerException"/>
        /// <exception cref="Javax.Xml.Parsers.ParserConfigurationException"/>
        public virtual void WriteToFile(Stream os)
        {
            XfdfWriter writer = new XfdfWriter(os);

            writer.Write(this);
        }