Esempio n. 1
0
 public ElementBoundaryControl(XmlTagsParser parserState)
 {
     this.parserState = parserState;
     if (parserState.Current == XmlParserTagInfo.NullTag)
     {
         throw new InvalidOperationException("You must call MoveToNextTag at least once before creating an element boundary.");
     }
     parserState.Current.IsBoundaryElement = true;
 }
Esempio n. 2
0
        /// <summary>
        /// Replicates the tag parser to create a new tag parser with exactly the same state.
        /// Changing either the original tag parser or the clone will not affect the other.
        /// </summary>
        /// <returns>Returns a new XmlTagsParser, initialized to the same data as the
        /// original parser and placed on the same position as the original parser.</returns>
        public XmlTagsParser Clone()
        {
            Validate();

            XmlTagsParser clone = new XmlTagsParser(_xml);

            clone._cursor = _cursor.Clone();
            clone.Cursor  = new ReadOnlyCursor(clone._cursor);
            clone._path   = _path.Clone();
            clone.Current = Current.Clone();
            return(clone);
        }
Esempio n. 3
0
 public void SetXMLData(String data)
 {
     CurrentState     = new XmlTagsParser(data ?? String.Empty);
     suppressNextMove = false;
 }
Esempio n. 4
0
 public void setXMLdata(String data)
 {
     CurrentState = new XmlTagsParser(data ?? String.Empty);
     MoveToNextTag();
 }