// For the HTML element, it should call this method with ns and prefix as String.Empty public override void WriteStartElement(string prefix, string localName, string ns) { Debug.Assert(localName != null && localName.Length != 0 && prefix != null && ns != null); elementScope.Push((byte)currentElementProperties); if (ns.Length == 0) { Debug.Assert(prefix.Length == 0); if (trackTextContent && inTextContent != false) { ChangeTextContentMark(false); } currentElementProperties = (ElementProperties)elementPropertySearch.FindCaseInsensitiveString(localName); base.bufChars[bufPos++] = (char)'<'; base.RawText(localName); base.attrEndPos = bufPos; } else { // Since the HAS_NS has no impact to the ElementTextBlock behavior, // we don't need to push it into the stack. currentElementProperties = ElementProperties.HAS_NS; base.WriteStartElement(prefix, localName, ns); } }
public override void WriteStartElement(string prefix, string localName, string ns) { Debug.Assert(localName != null && localName.Length != 0 && prefix != null && ns != null); _elementScope.Push((byte)_currentElementProperties); if (ns.Length == 0) { Debug.Assert(prefix.Length == 0); if (_trackTextContent && _inTextContent) { ChangeTextContentMark(false); } _currentElementProperties = TernaryTreeReadOnly.FindElementProperty(localName); base._bufChars[_bufPos++] = (char)'<'; base.RawText(localName); base._attrEndPos = _bufPos; } else { // Since the HAS_NS has no impact to the ElementTextBlock behavior, // we don't need to push it into the stack. _currentElementProperties = ElementProperties.HAS_NS; base.WriteStartElement(prefix, localName, ns); } }
public override void WriteStartElement(string prefix, string localName, string ns) { Debug.Assert(localName != null && localName.Length != 0 && prefix != null && ns != null); _elementScope.Push((byte)_currentElementProperties); if (ns.Length == 0) { Debug.Assert(prefix.Length == 0); _currentElementProperties = (ElementProperties)_elementPropertySearch.FindCaseInsensitiveString(localName); base._bufBytes[_bufPos++] = (byte)'<'; base.RawText(localName); base._attrEndPos = _bufPos; } else { // Since the HAS_NS has no impact to the ElementTextBlock behavior, // we don't need to push it into the stack. _currentElementProperties = ElementProperties.HAS_NS; base.WriteStartElement(prefix, localName, ns); } }