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

◆ WriteEndAttribute()

override void System.Xml.XmlWellFormedWriter.WriteEndAttribute ( )
inline

Definition at line 1720 of file XmlWellFormedWriter.cs.

1721 {
1722 try
1723 {
1724 AdvanceState(Token.EndAttribute);
1725 if (_specAttr != 0)
1726 {
1727 switch (_specAttr)
1728 {
1729 case SpecialAttribute.DefaultXmlns:
1730 {
1733 {
1734 if (_rawWriter != null)
1735 {
1737 {
1741 }
1742 else
1743 {
1745 }
1746 }
1747 else
1748 {
1749 _writer.WriteStartAttribute(string.Empty, "xmlns", "http://www.w3.org/2000/xmlns/");
1752 }
1753 }
1754 _curDeclPrefix = null;
1755 break;
1756 }
1757 case SpecialAttribute.PrefixedXmlns:
1758 {
1760 if (stringValue.Length == 0)
1761 {
1763 }
1764 if (stringValue == "http://www.w3.org/2000/xmlns/" || (stringValue == "http://www.w3.org/XML/1998/namespace" && _curDeclPrefix != "xml"))
1765 {
1767 }
1769 {
1770 if (_rawWriter != null)
1771 {
1773 {
1777 }
1778 else
1779 {
1781 }
1782 }
1783 else
1784 {
1785 _writer.WriteStartAttribute("xmlns", _curDeclPrefix, "http://www.w3.org/2000/xmlns/");
1788 }
1789 }
1790 _curDeclPrefix = null;
1791 break;
1792 }
1793 case SpecialAttribute.XmlSpace:
1794 {
1797 if (stringValue == "default")
1798 {
1799 _elemScopeStack[_elemTop].xmlSpace = XmlSpace.Default;
1800 }
1801 else
1802 {
1803 if (!(stringValue == "preserve"))
1804 {
1806 }
1807 _elemScopeStack[_elemTop].xmlSpace = XmlSpace.Preserve;
1808 }
1809 _writer.WriteStartAttribute("xml", "space", "http://www.w3.org/XML/1998/namespace");
1812 break;
1813 }
1814 case SpecialAttribute.XmlLang:
1815 {
1818 _writer.WriteStartAttribute("xml", "lang", "http://www.w3.org/XML/1998/namespace");
1821 break;
1822 }
1823 }
1824 _specAttr = SpecialAttribute.No;
1826 }
1827 else
1828 {
1830 }
1831 }
1832 catch
1833 {
1834 _currentState = State.Error;
1835 throw;
1836 }
1837 }
static string Xml_InvalidXmlSpace
Definition SR.cs:92
static string Xml_PrefixForEmptyNs
Definition SR.cs:286
static string Xml_CanNotBindToReservedNamespace
Definition SR.cs:108
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7
virtual bool SupportsNamespaceDeclarationInChunks
void WriteNamespaceDeclaration(string prefix, string ns)
virtual void WriteEndNamespaceDeclaration()
virtual void WriteStartNamespaceDeclaration(string prefix)
bool PushNamespaceExplicit(string prefix, string ns)
void WriteStartAttribute(string localName, string? ns)
Definition XmlWriter.cs:67

References System.Xml.XmlWellFormedWriter._attrValueCache, System.Xml.XmlWellFormedWriter._curDeclPrefix, System.Xml.XmlWellFormedWriter._currentState, System.Xml.XmlWellFormedWriter._elemScopeStack, System.Xml.XmlWellFormedWriter._elemTop, System.Xml.XmlWellFormedWriter._rawWriter, System.Xml.XmlWellFormedWriter._specAttr, System.Xml.XmlWellFormedWriter._writer, System.Xml.XmlWellFormedWriter.AdvanceState(), System.Xml.ArgumentException, System.Xml.XmlWellFormedWriter.AttributeValueCache.Clear(), System.Xml.Dictionary, System.SR.Format(), System.Xml.XmlWellFormedWriter.PushNamespaceExplicit(), System.Xml.XmlWellFormedWriter.AttributeValueCache.Replay(), System.Xml.XmlWellFormedWriter.AttributeValueCache.StringValue, System.Xml.XmlRawWriter.SupportsNamespaceDeclarationInChunks, System.Xml.XmlWellFormedWriter.AttributeValueCache.Trim(), System.Xml.XmlWriter.WriteEndAttribute(), System.Xml.XmlRawWriter.WriteEndNamespaceDeclaration(), System.Xml.XmlRawWriter.WriteNamespaceDeclaration(), System.Xml.XmlWriter.WriteStartAttribute(), System.Xml.XmlRawWriter.WriteStartNamespaceDeclaration(), System.SR.Xml_CanNotBindToReservedNamespace, System.SR.Xml_InvalidXmlSpace, System.SR.Xml_PrefixForEmptyNs, System.Xml.XmlWellFormedWriter.ElementScope.xmlLang, and System.Xml.XmlWellFormedWriter.ElementScope.xmlSpace.

Referenced by System.Xml.XmlWellFormedWriter.AdvanceState().