private void ByTag()
        {
            String tagName = tq.ConsumeElementSelector();

            Validate.NotEmpty(tagName);
            // namespaces: if element name is "abc:def", selector must be "abc|def", so flip:
            if (tagName.Contains("|"))
            {
                tagName = tagName.Replace("|", ":");
            }
            evals.Add(new Evaluator.Tag(tagName.Trim().ToLowerInvariant()));
        }
Example #2
0
        private void ByTag()
        {
            string tagName = _tq.ConsumeElementSelector();

            if (string.IsNullOrEmpty(tagName))
            {
                throw new Exception("tagName is empty.");
            }

            // namespaces: if element name is "abc:def", selector must be "abc|def", so flip:
            if (tagName.Contains("|"))
            {
                tagName = tagName.Replace("|", ":");
            }

            _evals.Add(new Evaluator.Tag(tagName.Trim().ToLowerInvariant()));
        }
Example #3
0
        private void ByTag()
        {
            string tagName = tq.ConsumeElementSelector();

            if (tagName.Length == 0)
            {
                throw Failure.EmptyString("tagName");
            }

            // namespaces: if element name is "abc:def", selector must be "abc|def", so flip:
            if (tagName.Contains("|"))
            {
                tagName = tagName.Replace("|", ":");
            }

            evals.Add(new Evaluator.Tag(DomName.Create(tagName.Trim().ToLower())));
        }