cancel
Showing results for 
Search instead for 
Did you mean: 

How can i change the ROOT ELEMENT name in my ADOBE Form

Former Member
0 Kudos

Hello All,

I need to change "data" the Root Element default name to another name.

Is this possible? How do i do this?

Thank you all in advance,

Eran

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

JavaScript: var string = xfa.data.saveXML();

//replace here

//send here

Former Member
0 Kudos

Hello Otto,

You Earned the points with respect!!!


var string = xfa.data.saveXML();
//replace here
string = string.replace(/data/gi, "My string for the ROOT ELEMENT"); //this will replace all the accurences of data DATA Data etc...
//update the dataset XML here
xfa.datasets.data.loadXML(string,1,1);

Best Regards,

Eran

Answers (4)

Answers (4)

OttoGold
Active Contributor
0 Kudos

Well, show me the code.

You first get the xml, where element . Next you send. You send manually from the script and send the XML string. I can´t see any problem, I have done this before.

Otto

OttoGold
Active Contributor
0 Kudos

What I propose is not connected with SAP or ABAP. Just check the JavaScript reference, there is some getXML() or something - function you use to "capture" all the data in your fields in the hierarchy which source is the XML hierarchy of the form. The result of the function is a string with XML representation of the form data. This string starts with this <data> which you can change manually and then submit this string to the WS.

Otto

Former Member
0 Kudos

Hello Otto,

I did write such code but somehow when the user submit the form the root element is "data" again

I'll use the live cycle designer ce2 to change the root element

and try to lock the form from there.

Best Regards,

Eran

OttoGold
Active Contributor
0 Kudos

If you need to send the XML to the XI from your form, you can get the XML first (scripting) and change the root element name in this XML as a string replace (scripting). Otto

Former Member
0 Kudos

Hello Chintan and Otto,

thank you for your replies...

Chintan: There is Adobe livecycle designer CE and its a stand alone application :[ designer CE2|http://www.adobe.com/products/livecycle/]

Otto: I know i can send the xml back and change it in my abap program but i'm talking about stand alone form in a computer with no sap on it.

The user will fill it and submit it ...

Thank you all in advance,

Eran

chintan_virani
Active Contributor
0 Kudos

Well as you correctly said it's a stand alone tool from Adobe, which is NOT supported by SAP.

Only LiveCycle Designer and that too from Service Marketplace is supposed to be used for creating forms in SAP.

Chintan

OttoGold
Active Contributor
0 Kudos

Why do you need to do that? Maybe your requirement can be solved some other way. Otto

Former Member
0 Kudos

Hello Otto,

The XI team will get the XML

They need to know what is the XML structure for further processing.

They cannot tell the difference between two XML files if the ROOT ELEMENT is the same...

In adobe livecycle CE there is a way to change the data ( ROOT ELEMENT) to another name...

Thanks again,

Eran

Edited by: Eran Fox on Jan 14, 2010 7:40 AM

chintan_virani
Active Contributor
0 Kudos

Just FYI.... there is no such thing as Adobe LiveCycle CE, there is only NetWeaver CE.

Chintan