I have an xml file that I import successfully into a pdf. However, if I have either:
1. Updated the pdf that I import into and removed a field OR
2. Have another pdf that has most (but not all) of the fields in the imported xml file
The submitted data will have the data that's on the xml, but also will have the data from the removed field or the other pdf. From my limited understanding, this data is in the DOM. What I want to do is:
REMOVE THE NODE/FIELD FROM THE XML FILE TO MATCH WHAT THE CURRENT PDF HAS.
I've tried, or thought of....
saveFilteredXML - not sure what a manifest is, help doesn't elaborate
remove - always fails to remove the node
xdpContent - this is a string of some kind, but help doesn't elaborate
loadXML
executeType
applyXSL
Any direction at all would be most helpful.
Solved! Go to Solution.
Views
Replies
Total Likes
Views
Replies
Total Likes
If the imported data has those nodes in it then when you export the data the nodes that were not used will also be carried along. You would have to eliminate the data nodes in the imbound XML.
Paul
Views
Replies
Total Likes
OK, but do you have any suggestions on how to eliminate the data nodes in the inbound XML? I've tried remove, but that always fails.
Views
Replies
Total Likes
If you are doing it inside of the form by then it is too late. Your best bet is to modify the XML before the merge using a style sheet. Can the application that is generating the XML be modified to stop generating this node?
Paul
Views
Replies
Total Likes
The .xml is on an end user's PC - they click a button on the blank .pdf, and the xfa.host.importData(""); command is fired. Is there any way to assign this style sheet during the importData function? Or should another function be called where I have more control over the incoming data?
Views
Replies
Total Likes
How was the xml generated in the 1st place?
You do not have a means of applying the style sheet from that command nor is there a command to apply a style sheet from Reader or Acrobat.
Paul
Views
Replies
Total Likes
I have a button that an end user clicks on that has this code - xfa.host.exportData("",0)
Views
Replies
Total Likes
So if the field does not exist then it will not be part of the datafile. Also if you have to have the field then you can set the binding to None and it will not b eincluded in the data that is exported.
Paul
Views
Replies
Total Likes
Tragically, LiveCycle (or maybe the reader itself? Not a clue) thinks that all the data imported from the .xml should remain (this is data from the XML Data DOM, I think) regardless of whether I've bound or not - so on submit, it remains (as useless fields/data) on the form - in the background somewhere. When you said the following - "Also if you have to have the field then you can set the binding to None and it will not b eincluded in the data that is exported." - if I were to explicitly set a useless node to binding=None, would that remove the data from the DOM? Or no? If yes, then how can I do that?
Views
Replies
Total Likes
If the data that you are importing already has nodes that are not used, then they will be carried forward when you export. If you want to get rid of the data then you have no choice but to start with a data file that does not have those nodes in it. So I would create the form the way you want it, then export fresh data and use that going forward.
Paul
Views
Replies
Total Likes
Views
Replies
Total Likes
The remove nodes should work but it is tricky. If you post your form and indicate which nodes you want to drop I can give it a try.
The applyXSL will only run serverside and the saveFilteredXML will require a manifest object that will take as much time to create as getting the removeNode to work.
Paul
Views
Replies
Total Likes
I'm assuming that when you say post, I should attach the xml file - I've paired it down quite a bit (it's kinda long!), and changed some field names.
The fields I would want to remove include....
<AuthNumber>
<billingMailAddr>
<hasPatientReached>
- <hasPatientReachedSubform>
- <NSLSubform>
- <NSLBPSubform>
<NSLBP />
<NSLIP />
</NSLBPSubform>
<NSLFindings />
<NSLIPExp />
</NSLSubform>
I realize this is quite a few, but even if you show me 1 or 2 examples, that would be great. Also, just to confirm your response, this would get rid of the "unused" nodes, and I won't see them anywhere (like on submission), right? With the saveFilteredXML, what is a manifest, anyway?
Views
Replies
Total Likes
Looks like the system is messing with the attachments again ....can you post the XML and the template to livecycle8@gmail.com?
Thanks
Paul
Views
Replies
Total Likes
Sure - just sent it. Actually, I'm not sure what you mean by the template
Views
Replies
Total Likes
The form design ..the PDF.
Paul
Views
Replies
Total Likes
Gotcha. I just sent the .pdf and the .xml.
Sorry, the fields to remove are....
<billingMailAddr>
<hasPatientReachedMMI>
- <hasPatientReachedMMISubform>
- <NSLSubform>
- <NSLBodyPartSubform>
<NSLBodyPart />
<NSLImpairPct />
</NSLBodyPartSubform>
<NSLFindingsTestResults />
<NSLImpairPctExplanation />
</NSLSubform>
Views
Replies
Total Likes