how to remove an attribute from a xml node?

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

how to remove an attribute from a xml node?

Post by hover27 » Sat Nov 16, 2019 12:05 am

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

THX
hover

jan_suhr
Advanced member
Posts: 266
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 » Sat Nov 16, 2019 8:45 am

XSLT
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps

hover27
Newbie
Posts: 8
Joined: Sat Apr 20, 2019 3:49 pm

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

Post by hover27 » Mon Nov 18, 2019 10:23 am

Thank you, that works.

freddyp
Advanced member
Posts: 463
Joined: Thu Feb 09, 2012 3:53 pm

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

Post by freddyp » Tue Nov 19, 2019 1:19 pm

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: 463
Joined: Thu Feb 09, 2012 3:53 pm

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

Post by freddyp » Tue Nov 19, 2019 1:19 pm

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: 8
Joined: Sat Apr 20, 2019 3:49 pm

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

Post by hover27 » Tue Nov 19, 2019 5:01 pm

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

Post Reply