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

◆ IsTextOnlyContent()

bool System.Data.XDRSchema.IsTextOnlyContent ( XmlElement node)
inlinepackage

Definition at line 168 of file XDRSchema.cs.

169 {
170 string attribute = node.GetAttribute("content");
171 if (attribute == null || attribute.Length == 0)
172 {
173 string attribute2 = node.GetAttribute("type", "urn:schemas-microsoft-com:datatypes");
174 return !string.IsNullOrEmpty(attribute2);
175 }
176 switch (attribute)
177 {
178 case "empty":
179 case "eltOnly":
180 case "elementOnly":
181 case "mixed":
182 return false;
183 case "textOnly":
184 return true;
185 default:
186 throw ExceptionBuilder.InvalidAttributeValue("content", attribute);
187 }
188 }

References System.Xml.Dictionary, and System.Data.ExceptionBuilder.InvalidAttributeValue().

Referenced by System.Data.XDRSchema.IsXDRField().