• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ximpleware.VTDNav类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中com.ximpleware.VTDNav的典型用法代码示例。如果您正苦于以下问题:C# VTDNav类的具体用法?C# VTDNav怎么用?C# VTDNav使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



VTDNav类属于com.ximpleware命名空间,在下文中一共展示了VTDNav类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: evalBoolean

        /// <summary>
        /// 
        /// </summary>
        /// <param name="vn"></param>
        /// <returns></returns>
        public override bool evalBoolean(VTDNav vn)
        {
            
                bool a = false;
                vn.push2();
                // record teh stack size
                int size = vn.contextStack2.size;
                try
                {
                    a = (evalNodeSet(vn) != -1);
                }
                catch (System.Exception ee)
                {
                }
                //rewind stack
                vn.contextStack2.size = size;
                reset(vn);
                vn.pop2();
                return a;
            //}
            /*if (e.Numerical)
            {
                double dval = e.evalNumber(vn);

                if (dval == 0.0 || System.Double.IsNaN(dval))
                    return false;
                return true;
            }

            String s = e.evalString(vn);
            if (s == null || s.Length == 0)
                return false;
            return true;*/

        }
开发者ID:IgorBabalich,项目名称:vtd-xml,代码行数:40,代码来源:UnionExpr.cs


示例2: bind

 /// <summary>
 /// attach a VTDNav instance to NodeRecorder
 /// </summary>
 /// <param name="vn1"></param>
 public void bind(VTDNav vn1)
 {
     if (vn1 == null)
         throw new System.ArgumentException(
                 "NodeRecorder can't take a null VTDNav instatnce");
     vn = vn1;
 }
开发者ID:IgorBabalich,项目名称:vtd-xml,代码行数:11,代码来源:NodeRecorder.cs


示例3: ElementFragmentNs

 protected internal ElementFragmentNs(VTDNav vn1, long l1, FastIntBuffer fib1, int len)
 {
     vn = vn1;
     l = l1;
     fib = fib1;
     stLen = len;
 }
开发者ID:DuLerWeil,项目名称:vtd-xml,代码行数:7,代码来源:ElementFragmentNs.cs


示例4: bind

 /// <summary> bind a BookMark object to a VTDNav object
 /// the cursor position is set to an invalid state
 /// </summary>
 /// <param name="vn">*
 /// </param>
 public void bind(VTDNav vn)
 {
     if (vn == null)
         throw new System.ArgumentException("vn can't be null");
     vn1 = vn;
     if (ba == null || vn.nestingLevel + 8 != ba.Length)
         ba = new int[vn.nestingLevel + 8];
     ba[0] = -2; // this would never happen in a VTDNav obj's context
 }
开发者ID:IgorBabalich,项目名称:vtd-xml,代码行数:14,代码来源:BookMark.cs


示例5: reset

 public void reset(VTDNav vn)
 {
     Alist temp = this;
     while (temp != null)
     {
         temp.e.reset(vn);
         temp = temp.next;
     }
 }
开发者ID:DuLerWeil,项目名称:vtd-xml,代码行数:9,代码来源:Alist.cs


示例6: evalBoolean

 public override bool evalBoolean(VTDNav vn)
 {
     // TODO Auto-generated method stub
     if (cached)
     {
         return eb;
     }
     else
     {
         eb = e.evalBoolean(vn);
         return eb;
     }
 }
开发者ID:IgorBabalich,项目名称:vtd-xml,代码行数:13,代码来源:CachedExpr.cs


示例7: eval

		public  bool eval(VTDNav vn)
		{
            if (vn.atTerminal)
                return false;
            switch (type)
            {
                case 0: return true;
                case 1: return vn.matchElement(nodeName);
                case 2: return vn.matchElementNS(URL, localName);
            }
            //}
            return false;
		}
开发者ID:IgorBabalich,项目名称:vtd-xml,代码行数:13,代码来源:NodeTest.cs


示例8: evalNumber

 public override double evalNumber(VTDNav vn)
 {
     // TODO Auto-generated method stub
     if (cached)
     {
         return en;
     }
     else
     {
         cached = true;
         en = e.evalNumber(vn);
         return en;
     }
 }
开发者ID:IgorBabalich,项目名称:vtd-xml,代码行数:14,代码来源:CachedExpr.cs


示例9: eval

		public  bool eval(VTDNav vn)
		{
			if (testType == NODE)
				return true;
			else if (testType == NAMETEST)
			{
				if (vn.atTerminal == true)
					return false;
				if (localName != null)
					return vn.matchElementNS(URL, localName);
				else
					return vn.matchElement(nodeName);
			}
			return false;
		}
开发者ID:IgorBabalich,项目名称:vtd-xml,代码行数:15,代码来源:NodeTest.cs


示例10: eval

		public bool eval(VTDNav vn)
		{
			bool b;
			count++; // increment the position
			expr.Position = count;
			if (expr.Numerical)
			{
				b = (expr.evalNumber(vn) == count);
			}
			else
			{
				b = expr.evalBoolean(vn);
			}
			return b;
		}
开发者ID:IgorBabalich,项目名称:vtd-xml,代码行数:15,代码来源:Predicate.cs


示例11: evalNodeSet

        public override int evalNodeSet(VTDNav vn)
        {
            // TODO Auto-generated method stub
            int i = -1;
            if (cached)
            {
                if (count < ens.size_Renamed_Field)
                {
                    i = ens.intAt(count);
                    vn.recoverNode(i);
                    count++;
                    return i;
                }
                else
                    return -1;

            }
            else
            {
                cached = true;

                if (ens == null)
                {
                    ens = new FastIntBuffer(8);//page size 64
                }
                //record node set
                while ((i = e.evalNodeSet(vn)) != -1)
                {
                    ens.append(i);
                }
                e.reset(vn);
                if (ens.size_Renamed_Field > 0)
                {
                    i = ens.intAt(count);//count should be zero
                    vn.recoverNode(i);
                    count++;
                    return i;
                }
                else
                    return -1;
            }
        }
开发者ID:IgorBabalich,项目名称:vtd-xml,代码行数:42,代码来源:CachedExpr.cs


示例12: eval

        public bool eval(VTDNav vn)
        {
            count++;
            switch (type)
            {
                case simple:
                    if (d < count)
                        return false;
                    else if (d == count)
                    {
                        if (s != null)
                        {
                            s.out_of_range = true;
                        }
                        else
                            fe.out_of_range = true;

                        return true;
                    }
                    return false;
                default:
                    bool b;
                    expr.Position = count;
                    if (expr.Numerical)
                    {
                        b = (expr.evalNumber(vn) == count);
                    }
                    else
                    {
                        b = expr.evalBoolean(vn);
                    }
                    if (b)
                        return true;
                    else
                        return false;
            }
        }
开发者ID:IgorBabalich,项目名称:vtd-xml,代码行数:37,代码来源:Predicate.cs


示例13: computeContextSize4PrecedingSibling2

 protected internal int computeContextSize4PrecedingSibling2(Predicate p, VTDNav vn)
 {
     int i=0;
     vn.push2();
     while(vn.toNode(VTDNav.PREV_SIBLING)){
     if (currentStep.eval2(vn,p)){
         i++;
     }
     }
     vn.pop2();
     currentStep.resetP(vn,p);
     currentStep.out_of_range=false;
     //currentStep.o = ap;
     return i;
 }
开发者ID:jzhang2004,项目名称:vtd-xml,代码行数:15,代码来源:LocationPathExpr.cs


示例14: computeContextSize4Parent

 protected internal int computeContextSize4Parent(Predicate p, VTDNav vn)
 {
     int i=0;
     AutoPilot ap = (AutoPilot)currentStep.o;
     vn.push2();
     i = 0;
     if (vn.toElement(VTDNav.PARENT)){
     if (currentStep.eval(vn,p)){
         i++;
     }
     }
     vn.pop2();
     currentStep.resetP(vn,p);
     currentStep.out_of_range=false;
     currentStep.o = ap;
     return i;
 }
开发者ID:jzhang2004,项目名称:vtd-xml,代码行数:17,代码来源:LocationPathExpr.cs


示例15: computeContextSize4FollowingSibling

 protected internal int computeContextSize4FollowingSibling(Predicate p, VTDNav vn)
 {
     int i=0;
     //AutoPilot ap = (AutoPilot)currentStep.o;
     vn.push2();
     while(vn.toElement(VTDNav.NEXT_SIBLING)){
     if (currentStep.eval(vn,p)){
         i++;
     }
     }
     vn.pop2();
     currentStep.resetP(vn,p);
     currentStep.out_of_range=false;
     //currentStep.o = ap;
     return i;
 }
开发者ID:jzhang2004,项目名称:vtd-xml,代码行数:16,代码来源:LocationPathExpr.cs


示例16: computeContextSize4DDFP2

        protected internal int computeContextSize4DDFP2(Predicate p, VTDNav vn)
        {
            int i=0;
            AutoPilot ap = (AutoPilot)currentStep.o;

            if (ap==null)
            ap = new AutoPilot(vn);
            else
            ap.bind(vn);

            //currentStep.o = ap = new AutoPilot(vn);
            if (currentStep.axis_type == AxisType.DESCENDANT_OR_SELF)
               ap.selectNode();
            else if (currentStep.axis_type == AxisType.DESCENDANT)
               ap.selectDescendantNode();
            else if (currentStep.axis_type == AxisType.PRECEDING)
               ap.selectPrecedingNode();
            else
               ap.selectFollowingNode();
            vn.push2();
            while(ap.iterate2()){
            if (currentStep.eval2(vn,p)){
                i++;
            }
            }
            vn.pop2();
            currentStep.resetP(vn,p);
            currentStep.out_of_range=false;
            currentStep.o = ap;
            return i;
        }
开发者ID:jzhang2004,项目名称:vtd-xml,代码行数:31,代码来源:LocationPathExpr.cs


示例17: computeContextSize4DDFP

 protected internal int computeContextSize4DDFP(Predicate p, VTDNav vn)
 {
     String helper = null;
     int i=0;
     AutoPilot ap = (AutoPilot)currentStep.o;
     if (currentStep.nt.testType == NodeTest.NODE){
     helper = "*";
     }else if (currentStep.nt.testType == NodeTest.NAMETEST){
     helper = currentStep.nt.nodeName;
     }else
     throw new XPathEvalException("can't run descendant "
             + "following, or following-sibling axis over comment(), pi(), and text()");
     if (ap==null)
     ap = new AutoPilot(vn);
     else
     ap.bind(vn);
     if (currentStep.axis_type == AxisType.DESCENDANT_OR_SELF0 )
     if (currentStep.nt.testType == NodeTest.NODE || helper.Equals("*"))
         ap.Special=true;
     else
         ap.Special=true;
     //currentStep.o = ap = new AutoPilot(vn);
     if (currentStep.axis_type == AxisType.DESCENDANT_OR_SELF0)
     if (currentStep.nt.localName!=null)
         ap.selectElementNS(currentStep.nt.URL,currentStep.nt.localName);
     else
         ap.selectElement(helper);
     else if (currentStep.axis_type == AxisType.DESCENDANT0)
     if (currentStep.nt.localName!=null)
         ap.selectElementNS_D(currentStep.nt.URL,currentStep.nt.localName);
     else
         ap.selectElement_D(helper);
     else if (currentStep.axis_type == AxisType.PRECEDING0)
     if (currentStep.nt.localName!=null)
         ap.selectElementNS_P(currentStep.nt.URL,currentStep.nt.localName);
     else
         ap.selectElement_P(helper);
     else
     if (currentStep.nt.localName!=null)
         ap.selectElementNS_F(currentStep.nt.URL,currentStep.nt.localName);
     else
         ap.selectElement_F(helper);
     vn.push2();
     while(ap.iterate()){
     if (currentStep.evalPredicates(vn,p)){
         i++;
     }
     }
     vn.pop2();
     currentStep.resetP(vn,p);
     currentStep.out_of_range=false;
     currentStep.o = ap;
     return i;
 }
开发者ID:jzhang2004,项目名称:vtd-xml,代码行数:54,代码来源:LocationPathExpr.cs


示例18: computeContextSize4Child2

 protected internal int computeContextSize4Child2(Predicate p, VTDNav vn)
 {
     int i=0;
     bool b = vn.toNode(VTDNav.FIRST_CHILD);
     if (b) {
     do {
         if (currentStep.eval2(vn, p)) {
             i++;
         }
     } while (vn.toNode(VTDNav.NS));
     vn.toNode(VTDNav.PARENT);
     currentStep.resetP(vn,p);
     currentStep.out_of_range=false;
     return i;
     } else
     return 0;
 }
开发者ID:jzhang2004,项目名称:vtd-xml,代码行数:17,代码来源:LocationPathExpr.cs


示例19: computeContextSize4AncestorOrSelf2

 protected internal int computeContextSize4AncestorOrSelf2(Predicate p, VTDNav vn)
 {
     int i=0;
     AutoPilot ap = (AutoPilot)currentStep.o;
     vn.push2();
     i = 0;
     do {
     if (currentStep.eval2(vn, p)) {
         i++;
     }
     }while(vn.toNode(VTDNav.PARENT));
     vn.pop2();
     currentStep.resetP(vn,p);
     currentStep.out_of_range=false;
     currentStep.o = ap;
     return i;
 }
开发者ID:jzhang2004,项目名称:vtd-xml,代码行数:17,代码来源:LocationPathExpr.cs


示例20: reset

 public override void reset(VTDNav vn)
 {
     state = START;
     Step temp = s;
     ih.reset();
     currentStep = null;
     while (temp != null)
     {
         temp.reset(vn);
         temp = temp.nextS;
     }
 }
开发者ID:jzhang2004,项目名称:vtd-xml,代码行数:12,代码来源:LocationPathExpr.cs



注:本文中的com.ximpleware.VTDNav类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# commonClass.DataSeries类代码示例发布时间:2022-05-26
下一篇:
C# ximpleware.VTDGen类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap