Expand my Community achievements bar.

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

My XML data is being written TWICE for the one button event!

Avatar

Level 2
I have a Submit button that is creating XML (well - XDP ) - and it was working fine - only output one set of tags.



I've added some more fields to the DataConnection and now "Presto!" it suddenly is output TWICE. First instance is with my data values inserted - the second instance is the raw dataconnection layout with empty fields!



How do I stop it doing this?



Thanks, DW
3 Replies

Avatar

Level 2
Ok - I figured this out - in the xdp - there are two sections -<br /><br /><xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"<br />><xfa:data> <br /><br />and <br /><br />><dd:dataDescription xmlns:dd="http://ns.adobe.com/data-description/" dd:name="xdp"<br />><xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"<br />><xfa:datasets<br /><br />For every single structure you are manipulating - hence you get two outputs. Who thinks this stuff up?!?<br /><br />The cure is to use XSLT and to re-format the output. This does work. Notice you will need to edit the filepath of the URI to the xslt, remove the directory path and prefix the filename with ./ <br /><br />DW

Avatar

Level 6
Hi,



You said you were creating a xdp structure.

Can you give me an example? I´m searching a way to get all the input fields on a pdf: name of the field and value.



Thank you

Avatar

Level 2
Select the XML output option for the button.



It will create the xdp structure - but then you will need to use XSLT to format it.



See this download example: http://www.emlvoting.org



and see under \download and \files



DW