Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
97698 Zobrazení

Is it possible to only replace the attributes of an xml field in an xml view but not the full field?

Example:

<page string="Contacts" attrs="{'invisible': [('is_company','=',False), ('child_ids', '=', [])]}" autofocus="autofocus">
...
</page>

All i want to change is the

attrs="{'invisible': [('is_company','=',False), ('child_ids', '=', [])]}"

to

attrs=""

without replacing the full page field and all of its content!

So the problem is that i only know how to replace the full <page> filed with all of its content - so i would have to copy and paste all of the content of the page field to my new inherited view also - not a good way for me!

So is there a way to only change the attributes of a field (xml node) through an inherited view?

Avatar
Zrušit
Nejlepší odpověď

Use below approach 


<xpath expr="//page[@string='Contacts']" position="attributes">
       <attribute name="attrs"></attribute>
</xpath>
Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
bře 15
6902
9
srp 20
3989
1
bře 15
5895
1
zář 15
4749
0
bře 15
4066