コード例 #1
0
ファイル: XmlParser.cs プロジェクト: xamarin/MonoDevelop.Xml
        protected XmlParser(XmlRootState rootState)
        {
            RootState = rootState;

            Context = new XmlParserContext {
                CurrentStateLength = 0,
                CurrentState       = rootState,
                PreviousState      = rootState,
                KeywordBuilder     = new StringBuilder(),
                Nodes = new NodeStack()
            };

            Context.Nodes.Push(RootState.CreateDocument());
        }
コード例 #2
0
        public void Reset()
        {
            currentState       = rootState;
            previousState      = rootState;
            position           = 0;
            stateTag           = 0;
            location           = new DocumentLocation(1, 1);
            previousLineEnd    = DocumentLocation.Empty;
            keywordBuilder     = new StringBuilder();
            currentStateLength = 0;
            nodes = new NodeStack();
            nodes.Push(rootState.CreateDocument());

            if (buildTree)
            {
                errors = new List <Error> ();
            }
            else
            {
                errors = null;
            }
        }