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

◆ WriteStartElement() [3/4]

override void System.Xml.XmlWellFormedWriter.WriteStartElement ( string prefix,
string localName,
string ns )
inline

Definition at line 1433 of file XmlWellFormedWriter.cs.

1434 {
1435 try
1436 {
1437 if (localName == null || localName.Length == 0)
1438 {
1440 }
1441 CheckNCName(localName);
1442 AdvanceState(Token.StartElement);
1443 if (prefix == null)
1444 {
1445 if (ns != null)
1446 {
1447 prefix = LookupPrefix(ns);
1448 }
1449 if (prefix == null)
1450 {
1451 prefix = string.Empty;
1452 }
1453 }
1454 else if (prefix.Length > 0)
1455 {
1457 if (ns == null)
1458 {
1459 ns = LookupNamespace(prefix);
1460 }
1461 if (ns == null || (ns != null && ns.Length == 0))
1462 {
1464 }
1465 }
1466 if (ns == null)
1467 {
1468 ns = LookupNamespace(prefix);
1469 if (ns == null)
1470 {
1471 ns = string.Empty;
1472 }
1473 }
1474 if (_elemTop == 0 && _rawWriter != null)
1475 {
1477 }
1478 _writer.WriteStartElement(prefix, localName, ns);
1479 int num = ++_elemTop;
1480 if (num == _elemScopeStack.Length)
1481 {
1482 ElementScope[] array = new ElementScope[num * 2];
1483 Array.Copy(_elemScopeStack, array, num);
1485 }
1486 _elemScopeStack[num].Set(prefix, localName, ns, _nsTop);
1488 if (_attrCount >= 14)
1489 {
1491 }
1492 _attrCount = 0;
1493 }
1494 catch
1495 {
1496 _currentState = State.Error;
1497 throw;
1498 }
1499 }
static string Xml_PrefixForEmptyNs
Definition SR.cs:286
static string Xml_EmptyLocalName
Definition SR.cs:294
Definition SR.cs:7
virtual void OnRootElement(ConformanceLevel conformanceLevel)
void PushNamespaceImplicit(string prefix, string ns)
Dictionary< string, int > _attrHashTable
override string LookupPrefix(string ns)
void WriteStartElement(string localName, string? ns)
Definition XmlWriter.cs:30
void Set(string prefix, string localName, string namespaceUri, int prevNSTop)

References System.Xml.XmlWellFormedWriter._attrCount, System.Xml.XmlWellFormedWriter._attrHashTable, System.Xml.XmlWellFormedWriter._conformanceLevel, System.Xml.XmlWellFormedWriter._currentState, System.Xml.XmlWellFormedWriter._elemScopeStack, System.Xml.XmlWellFormedWriter._elemTop, System.Xml.XmlWellFormedWriter._nsTop, System.Xml.XmlWellFormedWriter._rawWriter, System.Xml.XmlWellFormedWriter._writer, System.Xml.XmlWellFormedWriter.AdvanceState(), System.Xml.ArgumentException, System.array, System.Xml.XmlWellFormedWriter.CheckNCName(), System.Collections.Generic.Dictionary< TKey, TValue >.Clear(), System.Array.Copy(), System.Xml.XmlWellFormedWriter.LookupNamespace(), System.Xml.XmlWellFormedWriter.LookupPrefix(), System.Xml.XmlRawWriter.OnRootElement(), System.prefix, System.Xml.XmlWellFormedWriter.PushNamespaceImplicit(), System.Xml.XmlWellFormedWriter.ElementScope.Set(), System.Xml.XmlWriter.WriteStartElement(), System.SR.Xml_EmptyLocalName, and System.SR.Xml_PrefixForEmptyNs.