public override void WriteStartElement(string prefix, string localName, string nsURI) { if (_emitter == null) { this.DetermineOutputMethod(localName, nsURI); if (pendingFirstSpaces != null) { WriteWhitespace(pendingFirstSpaces.ToString()); pendingFirstSpaces = null; } } if (_state == WriteState.Prolog) { //Seems to be the first element - take care of Doctype // Note that HTML does not require SYSTEM identifier. if (_currentOutput.DoctypePublic != null || _currentOutput.DoctypeSystem != null) { Emitter.WriteDocType(prefix + (prefix == null? ":" : "") + localName, _currentOutput.DoctypePublic, _currentOutput.DoctypeSystem); } } CheckState(); if (nsURI == String.Empty) { prefix = String.Empty; } Emitter.WriteStartElement(prefix, localName, nsURI); _state = WriteState.Element; if (_nsManager.LookupNamespace(prefix, false) != nsURI) { // _nsManager.AddNamespace (prefix, nsURI); _currentNamespaceDecls [prefix] = nsURI; } pendingAttributesPos = 0; _canProcessAttributes = true; }