Example #1
0
		bool SetNextNode()
		{
			while (nodes.Count > 0)
			{
				_currentNode = nodes.Dequeue();

				if ((_currentNode is XmlBamlProperty)) continue;
				if ((_currentNode is XmlBamlSimpleProperty)) continue;

				if (this.NodeType == XmlNodeType.EndElement)
				{
					if (readingElements.Count == 1)
						_rootNamespaces = ((IXmlNamespaceResolver)this).GetNamespacesInScope(XmlNamespaceScope.All);
					readingElements.Pop();
				}
				else if (this.NodeType == XmlNodeType.Element)
					readingElements.Push((XmlBamlElement)_currentNode);

				return true;
			}

			return false;
		}
Example #2
0
		///<summary>
		///When overridden in a derived class, moves to the next attribute.
		///</summary>
		///
		///<returns>
		///true if there is a next attribute; false if there are no more attributes.
		///</returns>
		///
		public override bool MoveToNextAttribute()
		{
			intoAttribute = false;
			if (nodes.Count > 0 &&  (nodes.Peek() is XmlBamlProperty || nodes.Peek() is XmlBamlSimpleProperty))
			{
				_currentNode = nodes.Dequeue();
				return true;
			}
			return false;
		}