Expand my Community achievements bar.

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
Former Community Member

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

View solution in original post

3 Replies

Avatar

Former Community Member

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
Former Community Member

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

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----