admin 管理员组

文章数量: 1086019


2024年3月10日发(作者:影视后期特效)

///

///

///

///

public static void AddElement(XmlSchemaObject sourceXsd, Hashtable titles, XmlDocument sourceXml, XmlNode sourceNd, string[] values)

{

if (e() == typeof(XmlSchemaChoice))

{

XmlSchemaChoice choice = sourceXsd as XmlSchemaChoice;

decimal min = urs;

foreach (XmlSchemaObject item in )

{

if (e() == typeof(XmlSchemaElement))

{

string name = ((XmlSchemaElement)item).Name;

if (nsKey(name))

{

XmlElement element = Element(name);

// ext = (()[rowIndex, (int)titles[name]]).ng();

ext = values[(int)titles[name]];

Child(element);

}

}

else

{

AddElement (item, titles, sourceXml, sourceNd, values);

}

}

}

else if (e() == typeof(XmlSchemaElement))

{

string name = ((XmlSchemaElement)sourceXsd).Name;

if (nsKey(name))

{

XmlElement element = Element(name);

ext = values[(int)titles[name]];

Child(element);

}

}

else if (e() == typeof(XmlSchemaSequence))

{

foreach (XmlSchemaObject childItem in ((XmlSchemaSequence)sourceXsd).Items)

{

if (e() == typeof(XmlSchemaElement))

{

string name = ((XmlSchemaElement)childItem).Name;

if (nsKey(name))

{

XmlElement element = Element(name);

ext = values[(int)titles[name]];

Child(element);

}

}

else

{

AddElement(childItem, titles, sourceXml, sourceNd, values);

}

}

}

else

{

return;

}

}

/**////

/// 获得元素

///

///

///

public static GetDataItem(string name)

{

arr = new ();

XmlSchemaElement element = GetTableSchema(name);

if (element == null)

if (element == null)

{

return null;

}

XmlSchemaComplexType complex = Type as XmlSchemaComplexType;

XmlSchemaSequence sequence = tTypeParticle as XmlSchemaSequence;

foreach (XmlSchemaObject obj in )

{

if (e() == typeof(XmlSchemaElement))

{

XmlSchemaElement item = (XmlSchemaElement)obj;

(item);

}

else

{

GetItem(arr, obj);

}

}

return arr;

}

public static void GetItem( arr, XmlSchemaObject obj)

{

if (e() == typeof(XmlSchemaElement))

{

XmlSchemaElement item = (XmlSchemaElement)obj;

(item);

}

else if (e() == typeof(XmlSchemaChoice))

{

XmlSchemaChoice choice = obj as XmlSchemaChoice;

foreach (XmlSchemaObject child in )

{

if (e() == typeof(XmlSchemaElement))

{

XmlSchemaElement item = child as XmlSchemaElement;

(item);

}

else

{

GetItem(arr, child);

}

}

}

else if (e() == typeof(XmlSchemaSequence))

{

XmlSchemaSequence sequence = obj as XmlSchemaSequence;

foreach (XmlSchemaObject child in )

{

if (e() == typeof(XmlSchemaObject))

{

XmlSchemaElement item = child as XmlSchemaElement;

(item);

}

else

{

GetItem(arr, child);

}

}

}

else

{

return;

}

}

/**////

/// 根据节点名获得节点

///

///

///

public static XmlSchemaElement GetTableSchema(string name)

{

XmlSchemaSet xsSet = new XmlSchemaSet();

("/2001/XMLSchema", GetSchemaPath);

e();

XmlSchema schema=null;

foreach (XmlSchema xs in s())

{

schema = xs;

schema = xs;

}

XmlQualifiedName qf = new XmlQualifiedName(name, "/2001/XMLSchema");

if(ns(qf))

{

return (XmlSchemaElement)ts[qf];

}

return null;

}

static void XmlValidation(object sendor, ValidationEventArgs e)

{

switch (ty)

{

case :

throw ion;

case g:

throw ion;

}

}

/**////

/// 校验dom对象

///

///

///

public static string CheckDataXml(XmlDocument doc)

{

XmlSchemaSet xsd = new XmlSchemaSet();

("", GetSchemaPath);

s = xsd;

try

{

te(new ValidationEventHandler(XmlValidation));

}

catch (Exception ex)

{

return e;

}

return null;

}

}


本文标签: 节点 获得 影视