Exemplo n.º 1
0
        /// <summary>
        /// 从指定的流中读入文档。
        /// </summary>
        /// <param name="stream">输入流</param>
        /// <returns>加载后的文档自身</returns>
        public WEMDocument Load(Stream stream)
        {
            using (WEMDocumentReader reader = new WEMDocumentReader(stream))
            {
                reader.ReadDocument(this);
            }

            return this;
        }
Exemplo n.º 2
0
 /// <summary>
 /// 从文件中加载文档。
 /// </summary>
 /// <param name="filename">文件名</param>
 /// <returns>加载后的文档自身</returns>
 public WEMDocument Load(string filename)
 {
     using (WEMDocumentReader reader = new WEMDocumentReader(filename))
     {
         reader.ReadDocument(this);
     }
     return this;
 }