Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Extra tags in the submitted XML from PDF

Avatar

Former Community Member

Hi

I am using live cycle Designer to develop the interactive XDP form . Our server rendering the PDF using XDP and XML .afetr that

When user submitting the form ( PDF  ) , we are submitting the XML to servlet to perform the operations .

Herr the XML is having some extra tags . so i am getting the xml validation issue in the servlet issue . Please provide some comments to resolve the issue . But the same XDP when i am testing through designer  i am not geeting any extra tags .

The extra tags as follows : -

<xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">

<buttons>
<preview>true</preview>
<saveDraft>true</saveDraft>
<saveFinal>true</saveFinal>
</buttons>
><FSTEMPLATE_/><FSFORMQUERY_/>
<FSTRANSFORMATIONID_>PDFForm</FSTRANSFORMATIONID_>
<FSTARGETURL_/>
<FSAWR_/>
<FSWR_/>
<FSCRURI_/>
<FSBASEURL_/>
</xfa:data>

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can remove these additional tags with the following code. Place this code before submit the form data..

These additional tags are the process fields which are generated by the server at the time of rendering.

/********************************************* BEGIN ************************************************

var arrDeleteNodeList = new Array();

var intCounter =0;


for(var i=0;i<xfa.data.nodes.length;i++){

var strTagName = xfa.data.nodes.item(i).name;

     if(strTagName == "FSTEMPLATE_" || strTagName == "FSTRANSFORMATIONID_" || strTagName == "FSTARGETURL_" || strTagName == "FSBASEURL_" || strTagName == "FSFORMQUERY_" || strTagName == "FSAWR_" || strTagName == "FSWR_" || strTagName == "FSCRURI_"){
     arrDeleteNodeList[intCounter] = xfa.data.nodes.item(i);
     intCounter = parseInt(intCounter) +1;
     }

}

for(var j=0;j<arrDeleteNodeList.length;j++)
     xfa.data.nodes.remove(arrDeleteNodeList[j]);

/********************************************* END ************************************************

Let me know if this helps.

Thanks

Srini

View solution in original post

6 Replies

Avatar

Former Community Member

Have you tried setting the data binding on the fields and buttons you don't

want to export to 'None' ?

Avatar

Former Community Member

ya .  i set "None" if there is no mapping. Is there any setting i need to do

Avatar

Correct answer by
Level 10

You can remove these additional tags with the following code. Place this code before submit the form data..

These additional tags are the process fields which are generated by the server at the time of rendering.

/********************************************* BEGIN ************************************************

var arrDeleteNodeList = new Array();

var intCounter =0;


for(var i=0;i<xfa.data.nodes.length;i++){

var strTagName = xfa.data.nodes.item(i).name;

     if(strTagName == "FSTEMPLATE_" || strTagName == "FSTRANSFORMATIONID_" || strTagName == "FSTARGETURL_" || strTagName == "FSBASEURL_" || strTagName == "FSFORMQUERY_" || strTagName == "FSAWR_" || strTagName == "FSWR_" || strTagName == "FSCRURI_"){
     arrDeleteNodeList[intCounter] = xfa.data.nodes.item(i);
     intCounter = parseInt(intCounter) +1;
     }

}

for(var j=0;j<arrDeleteNodeList.length;j++)
     xfa.data.nodes.remove(arrDeleteNodeList[j]);

/********************************************* END ************************************************

Let me know if this helps.

Thanks

Srini

Avatar

Former Community Member

Thanks lot srini .

Its working fine . but i am getting new issue with XML

the version message is coming two times and the end tag coming like elow .

1. <?xml version="1.0"?><?xml version="1.0"?> like this msg instead of  one time

2. </LAST TAG >>

Is any idea . Advance thanks .

Avatar

Level 10

Hi,

     I tried multiple times by submitting the form to my mail id and the XML is coming properly..May be I am missing some thing here..

     Are you doing any XML manipulation before you submit other than removing the additonal tags we discussed in earlier reply?

Thanks

Srini

Avatar

Former Community Member

Thanks lot srini .

Its working well and submitting correct XML structure .