private bool ReadNextNode()
        {
            // attributes must not be taken into account while enumerating nodes
            if (CurrentEnumerator is IEnumerator <IXmlAttributeBuilder> )
            {
                _nodeType = XmlNodeType.Element;
                _enumerators.RemoveLast();
            }

            // ensure child nodes are enumerated
            if (_nodeType == XmlNodeType.Element && CurrentNode.HasChildNodes())
            {
                _enumerators.AddLast(CurrentNode.GetChildNodes().GetConservativeEnumerator());
            }

            // loop so as to skip empty Text nodes
            while (CurrentEnumerator.MoveNext())
            {
                if (CurrentNode is IXmlElementBuilder)
                {
                    _nodeType = XmlNodeType.Element;
                    return(true);
                }
                if (CurrentNode is IXmlTextBuilder)
                {
                    if (!CurrentNode.Value.IsNullOrEmpty())
                    {
                        _nodeType = XmlNodeType.Text;
                        return(true);
                    }
                }
                else
                {
                    throw new NotImplementedException();
                }
            }

            _enumerators.RemoveLast();

            // a non-empty element ---its children have just been enumerated--- requires an extra Read() for the closing tag
            if (CurrentNode is IXmlElementBuilder)
            {
                _nodeType = XmlNodeType.EndElement;
                return(true);
            }

            _nodeType = XmlNodeType.None;
            return(false);
        }