how to remove an attribute from a xml node?

Post Reply
hover27
Newbie
Posts: 14
Joined: Sat Apr 20, 2019 3:49 pm

how to remove an attribute from a xml node?

Post by hover27 »

Hi,
I'm searching for a possibility to remove an attribut with scripting.
Does anyone knows how?

THX
hover
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: how to remove an attribute from a xml node?

Post by jan_suhr »

XSLT
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
hover27
Newbie
Posts: 14
Joined: Sat Apr 20, 2019 3:49 pm

Re: how to remove an attribute from a xml node?

Post by hover27 »

Thank you, that works.
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: how to remove an attribute from a xml node?

Post by freddyp »

This is from the documentation of the Element class:

removeAttribute( qualified-name : String, prefix-map : Map )
Removes the attribute with the specified qualified name. If the qualified name includes a prefix, it is resolved using the map in the second argument, otherwise the second argument may be null or omitted.
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: how to remove an attribute from a xml node?

Post by freddyp »

This is from the documentation of the Element class:

removeAttribute( qualified-name : String, prefix-map : Map )
Removes the attribute with the specified qualified name. If the qualified name includes a prefix, it is resolved using the map in the second argument, otherwise the second argument may be null or omitted.
hover27
Newbie
Posts: 14
Joined: Sat Apr 20, 2019 3:49 pm

Re: how to remove an attribute from a xml node?

Post by hover27 »

oh, that's new in Switch 2019. :D
thx
Post Reply