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

◆ GetXmlString()

string System.Xml.Linq.XNode.GetXmlString ( SaveOptions o)
inlineprivateinherited

Definition at line 526 of file XNode.cs.

527 {
529 XmlWriterSettings xmlWriterSettings = new XmlWriterSettings();
531 if ((o & SaveOptions.DisableFormatting) == 0)
532 {
534 }
535 if ((o & SaveOptions.OmitDuplicateNamespaces) != 0)
536 {
537 xmlWriterSettings.NamespaceHandling |= NamespaceHandling.OmitDuplicates;
538 }
539 if (this is XText)
540 {
541 xmlWriterSettings.ConformanceLevel = ConformanceLevel.Fragment;
542 }
543 using (XmlWriter writer = XmlWriter.Create(stringWriter, xmlWriterSettings))
544 {
545 if (this is XDocument xDocument)
546 {
547 xDocument.WriteContentTo(writer);
548 }
549 else
550 {
552 }
553 }
554 return stringWriter.ToString();
555 }
static CultureInfo InvariantCulture
void WriteTo(XmlWriter writer)

References System.Xml.XmlWriter.Create(), System.Xml.Dictionary, System.Globalization.CultureInfo.InvariantCulture, System.writer, and System.Xml.Linq.XNode.WriteTo().

Referenced by System.Xml.Linq.XNode.ToString(), and System.Xml.Linq.XNode.ToString().