GetNextContentToken() 개인적인 메소드

retrieves next recognizable token from input string and identifies its type if no valid token is found, the output parameters are set to null if end of stream is reached without matching any token, token type paramter is set to EOF
private GetNextContentToken ( ) : void
리턴 void
            // ---------------------------------------------------------------------
            //
            // Constructors
            //
            // ---------------------------------------------------------------------

            #region Constructors

            /// <summary>
            /// Constructor. Initializes the _htmlLexicalAnalayzer element with the given input string
            /// </summary>
            /// <param name="inputString">
            /// string to parsed into well-formed Html
            /// </param>
            private HtmlParser(string inputString)
            {
                // Create an output xml document
                _document = new XmlDocument();

                // initialize open tag stack
                _openedElements = new Stack <XmlElement>();

                _pendingInlineElements = new Stack <XmlElement>();

                // initialize lexical analyzer
                _htmlLexicalAnalyzer = new HtmlLexicalAnalyzer(inputString);

                // get first token from input, expecting text
                _htmlLexicalAnalyzer.GetNextContentToken();
            }
예제 #2
0
    // ---------------------------------------------------------------------
    //
    // Constructors
    //
    // ---------------------------------------------------------------------

    #region Constructors

    /// <summary>
    /// Constructor. Initializes the _htmlLexicalAnalayzer element with the given input string
    /// </summary>
    /// <param name="inputString">
    /// string to parsed into well-formed Html
    /// </param>
    private HtmlParser(string inputString)
    {
        // Create an output xml document
        _document = new XmlDocument();

        // initialize open tag stack
        _openedElements = new Stack<XmlElement>();

        _pendingInlineElements = new Stack<XmlElement>();

        // initialize lexical analyzer
        _htmlLexicalAnalyzer = new HtmlLexicalAnalyzer(inputString);

        // get first token from input, expecting text
        _htmlLexicalAnalyzer.GetNextContentToken();
    }