code: function parseDocument(stream, state) {
          if(stream.eat("<")) {
              if(stream.eat("?")) {
                  // processing instruction
                  pushContext(state, TAG_INSTRUCTION);
                  state.tokenize = parseProcessingInstructionStartTag;
                  return STYLE_INSTRUCTION;
              } else if(stream.match("!--")) {
                  // new context: comment
                  pushContext(state, TAG_COMMENT);
                  return chain(stream, state, inBlock(STYLE_COMMENT, "-->", parseDocument));
              } else if(stream.eatSpace() || stream.eol() ) {
                  stream.skipToEnd();
                  return STYLE_ERROR;
              } else {
                  // element
                  state.tokenize = parseElementTagName;
                  return STYLE_ELEMENT_NAME;
              }
          }
          
          // error on line
          stream.skipToEnd();
          return STYLE_ERROR;
      }
docs: ///////////////////////////////////////////////////////////////////////// context: document  an XML document can contain: - a single declaration (if defined, it must be the very first line) - exactly one root element @todo try to actually limit the number of root elements to 1 - zero or more comments