Quinctia/SaveAndLoad.cs
(开头部分) 31KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace Quinctia
{
class SaveAndLoad
{
/// <summary>
/// 从一个XML文件中读取文档内容
/// </summary>
/// <param name="llReferences"></param>
/// <param name="xmlpath"></param>
public static void ReadRefListFromXML(LinkedList<Reference> llReferences, string xmlpath)
{
llReferences.Clear();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(xmlpath);
XmlNode root = xmlDoc.SelectSingleNode(ConstantDict.CONSTANT_REF_REFERENCES);
foreach (XmlNode xnReference in root.ChildNodes)
{
//只有读取到XmlElement才进一步读取
if (xnReference.GetType().ToString() == "System.Xml.XmlElement")
{
XmlElement xeReference = (XmlElement)xnReference;
string temp = xeReference.GetAttribute(ConstantDict.CONSTANT_REF_TYPE);
switch (temp)
{
case ConstantDict.CONSTANT_REF_TYPE_MONOGRAPH:
{
llReferences.AddLast(GetRefMonograph(xeReference));
}
break;
case ConstantDict.CONSTANT_REF_TYPE_MONOGRAPH_CONTRIBUTION:
{
llReferences.AddLast(GetRefMonographContribution(xeReference));
}
break;
case ConstantDict.CONSTANT_REF_TYPE_SERIAL:
{
llReferences.AddLast(GetRefSerial(xeReference));
}
break;
case ConstantDict.CONSTANT_REF_TYPE_SERIAL_CONTRIBUTION:
{
llReferences.AddLast(GetRefSerialContribution(xeReference));
}
break;
case ConstantDict.CONSTANT_REF_TYPE_PATENT_DOCUMENT:
{
llReferences.AddLast(GetRefPatentDocument(xeReference));
}
break;
后面还有 398 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
