ClassLibraryWeiBao/WebSurvey/SurveyResult.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace sstchur.web.survey
{
    using System;
    using System.ComponentModel;
    using System.IO;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Xml;
    using System.Xml.XPath;
    using System.Xml.Xsl;

    [ToolboxItem(false)]
    public class SurveyResult : WebControl
    {
        private XmlDocument m_docResults = new XmlDocument();
        private string m_strAnswersFile = "";
        private string m_strStylesheet = "";
        private string m_strSurveyFile = "";
        private string m_strXQuery1 = "";
        private string m_strXQuery2 = "";

        public SurveyResult()
        {
            XmlDeclaration newChild = this.m_docResults.CreateXmlDeclaration("1.0", null, null);
            this.m_docResults.AppendChild(newChild);
            XmlElement element = this.m_docResults.CreateElement("SurveyResult");
            this.m_docResults.AppendChild(element);
        }

        private void AppendNodeList(XmlDocument _doc, XmlNodeList[] _nodeListArray)
        {
            foreach (XmlNodeList list in _nodeListArray)
            {
                foreach (XmlNode node in list)
                {
                    _doc.DocumentElement.AppendChild(_doc.ImportNode(node, true));
                }
            }
        }

        private XmlNodeList[] GetNodes(XmlDocument _doc, string _queryList)
        {
            string[] textArray = _queryList.Split(new char[] { ',' });
            XmlElement documentElement = _doc.DocumentElement;
            XmlNodeList[] listArray = new XmlNodeList[textArray.Length];
            int index = 0;
            for (int i = 0; i < textArray.Length; i++)
            {
                string xpath = textArray[i];
                listArray[index] = documentElement.SelectNodes(xpath);
                index++;
            }
            return listArray;
        }

        protected override void OnLoad(EventArgs e)
        {
            XmlDocument document = new XmlDocument();
            document.Load(this.m_strSurveyFile);
后面还有 61 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。