M.E.
M.E.

Reputation: 5495

XPath, select group containing a given element with a given name

I have the following xml code:

[...]
                        <group>
                            <field name="code"/>
                            <field name="return_picking_type_id"/>
                            <field name="barcode_nomenclature_id" groups="base.group_no_one"/>
                        </group>
[...]

Which would be the XPath syntax to select this <group> tag (the one which contains <field name="code"> tag)?

Upvotes: 0

Views: 1079

Answers (1)

LMC
LMC

Reputation: 12777

This could work

'//group[field[@name="code"]]'

Upvotes: 2

Related Questions