TinyXpath v_get_xpath_base,第二个参数 [英] TinyXpath v_get_xpath_base, second parameter

查看:85
本文介绍了TinyXpath v_get_xpath_base,第二个参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里将什么作为第二个参数传递给 v_get_xpath_base 让它正常工作,无论我如何尝试,似乎总是有问题.该类是基类,不能实例化,也不能强制转换该类.

What do I pass here as the second parameter to v_get_xpath_base in order to get it to work, no matter what I try, there always seems to be a problem. Either the class is a base class and cannot be instantiated or the class cannot be casted.

我很茫然,有人可以帮我吗?

I'm at a loss, someone help me please?

        TiXmlElement* outputnode = new TiXmlElement("test");
  bool isAttrib;
  proc.v_get_xpath_base(1, outputnode, isAttrib);

就目前而言,TiXmlElement无法转换为const TiXmlBase*&

As it currently stands, the TiXmlElement cannot be cast to const TiXmlBase*&

推荐答案

API将为您返回匹配的节点-我想您需要类似的东西

The API is going to return you the matching node - I imagine you need something like:

const TiXmlBase* outputnode(0);
bool isAttrib;
proc.v_get_xpath_base(1, outputnode, isAttrib);

,调用后,outputNode将指向匹配的数据.似乎您必须使用const TiXmlBase*作为outputnode的类型. 此处可以做到这一点.

and after the call, outputNode will point to the matched data. Seems like you have to use const TiXmlBase* as the type for outputnode. There is a sample here that does this.

请注意,根据TinyXml文档,此操作仅在完成后有效:

Note that this only works after you have done this, per the TinyXml docs:

只能在致电后使用 u_compute_xpath_node_set.

Can only be used after a call to u_compute_xpath_node_set.

这篇关于TinyXpath v_get_xpath_base,第二个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆