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

◆ AddDefaultAttributes()

void System.Xml.XmlDocument.AddDefaultAttributes ( XmlElement elem)
inlinepackage

Definition at line 799 of file XmlDocument.cs.

800 {
803 if (schemaElementDecl == null || schemaElementDecl.AttDefs == null)
804 {
805 return;
806 }
808 {
809 SchemaAttDef value = attDef.Value;
810 if (value.Presence == SchemaDeclBase.Use.Default || value.Presence == SchemaDeclBase.Use.Fixed)
811 {
812 string name = value.Name.Name;
813 string attrNamespaceURI = string.Empty;
814 string attrPrefix;
815 if (dtdSchemaInfo.SchemaType == SchemaType.DTD)
816 {
817 attrPrefix = value.Name.Namespace;
818 }
819 else
820 {
821 attrPrefix = value.Prefix;
822 attrNamespaceURI = value.Name.Namespace;
823 }
825 elem.SetAttributeNode(attributeNode);
826 }
827 }
828 }
SchemaInfo? DtdSchemaInfo
XmlAttribute PrepareDefaultAttribute(SchemaAttDef attdef, string attrPrefix, string attrLocalname, string attrNamespaceURI)
SchemaElementDecl GetSchemaElementDecl(XmlElement elem)

References System.Xml.Dictionary, System.Xml.XmlDocument.DtdSchemaInfo, System.Xml.XmlDocument.GetSchemaElementDecl(), System.Xml.XmlDocument.PrepareDefaultAttribute(), and System.value.

Referenced by System.Xml.XmlDocument.CreateElement().