Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

delete nodes xml

Avatar

Level 4

hello, you know how to delete an XML node example with a button????


there is a way to delete a node??

1 Accepted Solution

Avatar

Correct answer by
Level 10

Having an empty node is not sufficient? Note that when you delete something from the DOM that a remerge of the data and template will happen automatically ...this has caused me grief in the past (if you are getting additional data from an external source).

The command is:

xfa.datasets.data.form1.page1.nodes.remove(xfaObject to remove);

so typically the exppression is like this:

xfa.datasets.data.form1.page1.nodes.remove(xfa.resolveNode("xfa.datasets.data.form1.page1.billingMailAddr"));

Assuming you wanted to remove the billingMailAddr nodes.

Paul

3 Replies

Avatar

Level 10

Yes but it is very dangerous to do that .....why and what are you trying to delete?

Paul

Avatar

Level 4

hello thanks for the reply, I have a set of checkboxes

were selected if I create an XML node with loadXML

I want to delete this node created if a checkbox is unchecked

Avatar

Correct answer by
Level 10

Having an empty node is not sufficient? Note that when you delete something from the DOM that a remerge of the data and template will happen automatically ...this has caused me grief in the past (if you are getting additional data from an external source).

The command is:

xfa.datasets.data.form1.page1.nodes.remove(xfaObject to remove);

so typically the exppression is like this:

xfa.datasets.data.form1.page1.nodes.remove(xfa.resolveNode("xfa.datasets.data.form1.page1.billingMailAddr"));

Assuming you wanted to remove the billingMailAddr nodes.

Paul