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

◆ XmlWellFormedWriter()

System.Xml.XmlWellFormedWriter.XmlWellFormedWriter ( XmlWriter writer,
XmlWriterSettings settings )
inlinepackage

Definition at line 1305 of file XmlWellFormedWriter.cs.

1306 {
1307 _writer = writer;
1308 _rawWriter = writer as XmlRawWriter;
1309 _predefinedNamespaces = writer as IXmlNamespaceResolver;
1310 if (_rawWriter != null)
1311 {
1312 _rawWriter.NamespaceResolver = new NamespaceResolverProxy(this);
1313 }
1314 _checkCharacters = settings.CheckCharacters;
1315 _omitDuplNamespaces = (settings.NamespaceHandling & NamespaceHandling.OmitDuplicates) != 0;
1316 _writeEndDocumentOnClose = settings.WriteEndDocumentOnClose;
1317 _conformanceLevel = settings.ConformanceLevel;
1318 _stateTable = ((_conformanceLevel == ConformanceLevel.Document) ? s_stateTableDocument : s_stateTableAuto);
1319 _currentState = State.Start;
1320 _nsStack = new Namespace[8];
1321 _nsStack[0].Set("xmlns", "http://www.w3.org/2000/xmlns/", NamespaceKind.Special);
1322 _nsStack[1].Set("xml", "http://www.w3.org/XML/1998/namespace", NamespaceKind.Special);
1323 if (_predefinedNamespaces == null)
1324 {
1325 _nsStack[2].Set(string.Empty, string.Empty, NamespaceKind.Implied);
1326 }
1327 else
1328 {
1330 _nsStack[2].Set(string.Empty, (text == null) ? string.Empty : text, NamespaceKind.Implied);
1331 }
1332 _nsTop = 2;
1333 _elemScopeStack = new ElementScope[8];
1334 _elemScopeStack[0].Set(string.Empty, string.Empty, string.Empty, _nsTop);
1335 _elemScopeStack[0].xmlSpace = XmlSpace.None;
1336 _elemScopeStack[0].xmlLang = null;
1337 _elemTop = 0;
1338 _attrStack = new AttrName[8];
1339 }
static readonly State[] s_stateTableDocument
static readonly State[] s_stateTableAuto
readonly IXmlNamespaceResolver _predefinedNamespaces
string? LookupNamespace(string prefix)
void Set(string prefix, string localName, string namespaceUri, int prevNSTop)
void Set(string prefix, string namespaceUri, NamespaceKind kind)

References System.Xml.XmlWellFormedWriter._attrStack, System.Xml.XmlWellFormedWriter._checkCharacters, System.Xml.XmlWellFormedWriter._conformanceLevel, System.Xml.XmlWellFormedWriter._currentState, System.Xml.XmlWellFormedWriter._elemScopeStack, System.Xml.XmlWellFormedWriter._elemTop, System.Xml.XmlWellFormedWriter._nsStack, System.Xml.XmlWellFormedWriter._nsTop, System.Xml.XmlWellFormedWriter._omitDuplNamespaces, System.Xml.XmlWellFormedWriter._predefinedNamespaces, System.Xml.XmlWellFormedWriter._rawWriter, System.Xml.XmlWellFormedWriter._stateTable, System.Xml.XmlWellFormedWriter._writeEndDocumentOnClose, System.Xml.XmlWellFormedWriter._writer, System.Xml.XmlWriterSettings.CheckCharacters, System.Xml.XmlWriterSettings.ConformanceLevel, System.Xml.Dictionary, System.Xml.IXmlNamespaceResolver.LookupNamespace(), System.Xml.XmlWellFormedWriter.s_stateTableAuto, System.Xml.XmlWellFormedWriter.s_stateTableDocument, System.Xml.XmlWellFormedWriter.ElementScope.Set(), System.Xml.XmlWellFormedWriter.Namespace.Set(), System.text, System.Xml.XmlWriterSettings.WriteEndDocumentOnClose, System.writer, System.Xml.XmlWellFormedWriter.ElementScope.xmlLang, and System.Xml.XmlWellFormedWriter.ElementScope.xmlSpace.