Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetSchema()

XmlElement System.Data.XmlTreeGen.GetSchema ( string NamespaceURI)
inlinepackage

Definition at line 1061 of file XmlTreeGen.cs.

1062 {
1064 if (xmlElement == null)
1065 {
1066 xmlElement = _dc.CreateElement("xs", "schema", "http://www.w3.org/2001/XMLSchema");
1067 WriteSchemaRoot(_dc, xmlElement, NamespaceURI);
1068 if (!string.IsNullOrEmpty(NamespaceURI))
1069 {
1070 string text = "app" + Convert.ToString(++_prefixCount, CultureInfo.InvariantCulture);
1071 _sRoot.SetAttribute("xmlns:" + text, NamespaceURI);
1072 xmlElement.SetAttribute("xmlns:" + text, NamespaceURI);
1073 _prefixes[NamespaceURI] = text;
1074 }
1075 _namespaces[NamespaceURI] = xmlElement;
1076 }
1077 return xmlElement;
1078 }
void WriteSchemaRoot(XmlDocument xd, XmlElement rootSchema, string targetNamespace)
static CultureInfo InvariantCulture
XmlElement CreateElement(string name)
virtual void SetAttribute(string name, string? value)

References System.Data.XmlTreeGen._dc, System.Data.XmlTreeGen._namespaces, System.Data.XmlTreeGen._prefixCount, System.Data.XmlTreeGen._prefixes, System.Data.XmlTreeGen._sRoot, System.Xml.XmlDocument.CreateElement(), System.Xml.Dictionary, System.Globalization.CultureInfo.InvariantCulture, System.Xml.XmlElement.SetAttribute(), System.text, System.Convert.ToString(), and System.Data.XmlTreeGen.WriteSchemaRoot().

Referenced by System.Data.XmlTreeGen.AppendChildWithoutRef(), System.Data.XmlTreeGen.HandleColumn(), System.Data.XmlTreeGen.HandleColumnType(), and System.Data.XmlTreeGen.HandleTable().