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

◆ WriteSchemaRoot()

void System.Data.XmlTreeGen.WriteSchemaRoot ( XmlDocument xd,
XmlElement rootSchema,
string targetNamespace )
inlinepackage

Definition at line 334 of file XmlTreeGen.cs.

335 {
336 if (!string.IsNullOrEmpty(targetNamespace))
337 {
338 rootSchema.SetAttribute("targetNamespace", targetNamespace);
339 rootSchema.SetAttribute("xmlns:mstns", targetNamespace);
340 }
341 rootSchema.SetAttribute("xmlns", targetNamespace);
342 rootSchema.SetAttribute("xmlns:xs", "http://www.w3.org/2001/XMLSchema");
343 rootSchema.SetAttribute("xmlns:msdata", "urn:schemas-microsoft-com:xml-msdata");
344 if (_ds != null && HaveExtendedProperties(_ds))
345 {
346 rootSchema.SetAttribute("xmlns:msprop", "urn:schemas-microsoft-com:xml-msprop");
347 }
348 if (!string.IsNullOrEmpty(targetNamespace))
349 {
350 rootSchema.SetAttribute("attributeFormDefault", "qualified");
351 rootSchema.SetAttribute("elementFormDefault", "qualified");
352 }
353 }
bool HaveExtendedProperties(DataSet ds)

References System.Data.XmlTreeGen._ds, System.Xml.Dictionary, and System.Data.XmlTreeGen.HaveExtendedProperties().

Referenced by System.Data.XmlTreeGen.GetSchema(), System.Data.XmlTreeGen.SchemaTree(), and System.Data.XmlTreeGen.SchemaTree().