Community mailing list archives

Re: xpath on v9 community

Vauxoo S.A. de C.V., Moisés Augusto López Calderón
- 08/23/2016 11:50:15
You could use a parent item and a index by number of items, example:
 <xpath expr="//parent_item_with_name[@name='item_x']/page[2]" position="after"

In this case, the item searched is
<parent_item_with_name name="item_x">
   <page string="0"></page>
   <page string="1"></page>
   <page string="2"></page> <!-- this item is searched-->

2016-08-23 10:37 GMT-05:00 Kristian Koci <>:
Hi Community

I'm presenting a problem, and a little confusion about this

As You know, on v9, you can't put 'string' on xpath anymore, but, what if I want to inherit a <page> which has a string as name? ie. <page string="Bill">, and I want to put an element after this page ie. <xpath expr="//page[@name='Bill']" position="after">

If I do this, the page is not found, even being there, because it has not a name, it has a string.

BUT, on the other hand, if I put string on the xpath, it will obviously throw an error.

So, what kind of solution do I need on this situation?

My xpath looks like this <xpath expr="//page[@name='Bill']" position="after"> can't use string either.

Any ideas?

Thanks in advance
Kristian Koci
Linux User #582221

Post to:

Moisés López Calderón
Vauxoo - OpenERP's Gold Partner
Mobile: (+521) 477-752-22-30
Office: (+52) 477-773-33-46
twitter: @vauxoo