Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

How to set the value in the xml node.

Avatar

Former Community Member

Hi

I am having the application PDF which can be submitted by user using the button. while submitting 

i am using below code to set the value in the xml node.

   xfa.data.assignnode("employee.id","123",0):

So its generating the xml like below.

<employee>.

<id>123</id>.

</name>

</employee>

Now i need to generate the xml like  below.

<employee id= "123" >

  </Name>

</employee>

So how to set/create the id node like above?

Advance Thanks.

Regards,

Dhiyane

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Dhiyane,

You will have to set the contains property if the id node to "metaData", that is;

xfa.data.assignNode("employee.id","123",0);
xfa.data.employee.id.contains = "metaData";

Very clumsy if you have a number of them, in which case you might want to look at using E4X.

Good luck

Bruce

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi Dhiyane,

You will have to set the contains property if the id node to "metaData", that is;

xfa.data.assignNode("employee.id","123",0);
xfa.data.employee.id.contains = "metaData";

Very clumsy if you have a number of them, in which case you might want to look at using E4X.

Good luck

Bruce