Exemplo n.º 1
0
    //----------------------------------------------------------------------------------------------
    /// <summary>XML形式のドキュメントを作成する</summary>
    /// <return>XMLドキュメント</return>
    public XmlDocument GetXml(DateTime from, DateTime to)
    {
        XmlDocument   xml     = new XmlDocument();
        EventReader   reader  = EventReader.getInstance();
        List <string> xmlList = reader.GetXmlList(from, to);
        StringBuilder sb      = new StringBuilder();

        sb.Append(Constants.XML_HEADER);
        foreach (string element in xmlList)
        {
            sb.Append(element);
            sb.Append("\r\n");
        }
        sb.Append(Constants.XML_FOOTER);
        xml.LoadXml(sb.ToString());
        return(xml);
    }