and replace it with data as metioned in example org.docx4j.samples.ContentControlsXmlEdit
- Code: Select all
String itemId = "{5448916C-134B-45E6-B8FE-88CC1FFC17C3}".toLowerCase();
CustomXmlDataStoragePart customXmlDataStoragePart = wordMLPackage.getCustomXmlDataStorageParts().get(itemId);
// .. if you don't know the itemId (which you can get using ContentControlsPartsInfo),
// you could get the part by name, by type,
// or you could find the item Id by looking in an SDT for w:storeItemID:
// <w:sdt>
// <w:sdtPr>
// <w:dataBinding w:prefixMappings="" w:xpath="/myxml[1]/element1[1]"
// w:storeItemID="{5448916C-134B-45E6-B8FE-88CC1FFC17C3}"/>
// </w:sdtPr>
// <w:sdtContent>
// Get the contents
CustomXmlDataStorage customXmlDataStorage = customXmlDataStoragePart.getData();
// In a real program what you might do is populate this with your own data.
// You could replace the whole part (as is done in https://github.com/plutext/OpenDoPE-WAR/blob/master/webapp-simple/src/main/java/org/opendope/webapp/SubmitBoth.java ),
// or as we show below, just set some particular value
// Change its contents. Here we use XPath, but you could get the DOM document:
// ((CustomXmlDataStorageImpl)customXmlDataStorage).getDocument()
// and do whatever ....
((CustomXmlDataStorageImpl)customXmlDataStorage).setNodeValueAtXPath("/myxml/element1", example_value_to_inject,
"xmlns:ns0='http://your.namespace'"); // no prefix mappings required here, but that shows you how to do it
Please need help in adding databinding to my document. Please advice.
I am playing with the attached docx this has content controls but no datbinging nor itemId.Please advice how to add itemId and datbinging.
here xml fo this docx
- Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml">
<w:body>
<w:p>
<w:pPr>
<w:pStyle w:val="SigBox"/>
<w:tabs>
<w:tab w:val="clear" w:pos="4320"/>
<w:tab w:val="clear" w:pos="8640"/>
</w:tabs>
<w:jc w:val="center"/>
<w:rPr>
<w:b/>
<w:szCs w:val="24"/>
<w:u w:val="single"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:b/>
<w:szCs w:val="24"/>
<w:u w:val="single"/>
</w:rPr>
<w:t>CERTIFIED MAIL - RETURN RECEIPT REQUESTED</w:t>
</w:r>
</w:p>
<w:sdt>
<w:sdtPr>
<w:rPr>
<w:szCs w:val="24"/>
</w:rPr>
<w:id w:val="-889017388"/>
<w:placeholder>
<w:docPart w:val="EDCA2E64CFCD4F488D76F03E8327CACD"/>
</w:placeholder>
<w:text/>
</w:sdtPr>
<w:sdtContent>
<w:p>
<w:pPr>
<w:pStyle w:val="SigBox"/>
<w:tabs>
<w:tab w:val="clear" w:pos="4320"/>
<w:tab w:val="clear" w:pos="8640"/>
</w:tabs>
<w:ind w:left="2880" w:firstLine="720"/>
<w:rPr>
<w:sz w:val="22"/>
<w:szCs w:val="22"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:sz w:val="22"/>
<w:szCs w:val="22"/>
</w:rPr>
<w:t xml:space="preserve"/>
</w:r>
<w:proofErr w:type="gramStart"/>
<w:r>
<w:rPr>
<w:sz w:val="22"/>
<w:szCs w:val="22"/>
</w:rPr>
<w:t>facIdentificationNumber</w:t>
</w:r>
<w:proofErr w:type="gramEnd"/>
</w:p>
</w:sdtContent>
</w:sdt>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
</w:pPr>
</w:p>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
<w:highlight w:val="yellow"/>
</w:rPr>
</w:pPr>
</w:p>
<w:sdt>
<w:sdtPr>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
<w:b/>
</w:rPr>
<w:tag w:val="adl/transmittalLetterDate"/>
<w:id w:val="-885164104"/>
<w:placeholder>
<w:docPart w:val="EDCA2E64CFCD4F488D76F03E8327CACD"/>
</w:placeholder>
<w:text/>
</w:sdtPr>
<w:sdtContent>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
<w:b/>
</w:rPr>
</w:pPr>
<w:proofErr w:type="gramStart"/>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
<w:b/>
</w:rPr>
<w:t>transmittalLetterDate</w:t>
</w:r>
<w:proofErr w:type="gramEnd"/>
</w:p>
</w:sdtContent>
</w:sdt>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
<w:highlight w:val="yellow"/>
</w:rPr>
</w:pPr>
</w:p>
<w:sdt>
<w:sdtPr>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
<w:tag w:val="adl/granteeName"/>
<w:id w:val="-885164123"/>
<w:placeholder>
<w:docPart w:val="EDCA2E64CFCD4F488D76F03E8327CACD"/>
</w:placeholder>
<w:text/>
</w:sdtPr>
<w:sdtContent>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
</w:pPr>
<w:proofErr w:type="gramStart"/>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
<w:t>granteeName</w:t>
</w:r>
<w:proofErr w:type="gramEnd"/>
</w:p>
</w:sdtContent>
</w:sdt>
<w:sdt>
<w:sdtPr>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
<w:tag w:val="adl/granteeAddress"/>
<w:id w:val="-885164106"/>
<w:placeholder>
<w:docPart w:val="EDCA2E64CFCD4F488D76F03E8327CACD"/>
</w:placeholder>
<w:text/>
</w:sdtPr>
<w:sdtContent>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
</w:pPr>
<w:proofErr w:type="gramStart"/>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
<w:t>granteeAddress</w:t>
</w:r>
<w:proofErr w:type="gramEnd"/>
</w:p>
</w:sdtContent>
</w:sdt>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
<w:t xml:space="preserve"/>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
</w:pPr>
</w:p>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:ind w:left="720"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
<w:noProof/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
<w:noProof/>
</w:rPr>
<w:t>In accordance with 45 CFR 98.66(f), you may request reconsideration by the Assistant Secretary. A request for reconsideration will not preclude your right to a subsequent appeal. Your written request for reconsideration by the Assistant Secretary must be made within 30 days of the date of this letter, and must include a copy of this disallowance letter, and be sent to:</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
</w:pPr>
</w:p>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
</w:pPr>
</w:p>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:ind w:left="720"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
<w:noProof/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
<w:noProof/>
</w:rPr>
<w:t>In accordance with 45 CFR 98.66(f), you may request reconsideration by the Assistant Secretary. A request for reconsideration will not preclude your right to a subsequent appeal. Your written request for reconsideration by the Assistant Secretary must be made within 30 days of the date of this letter, and must include a copy of this disallowance letter, and be sent to:</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
</w:pPr>
</w:p>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
</w:pPr>
</w:p>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
</w:pPr>
</w:p>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:ind w:left="720"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
<w:noProof/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
<w:noProof/>
</w:rPr>
<w:t>In accordance with 45 CFR 98.66(f), you may request reconsideration by the Assistant Secretary. A request for reconsideration will not preclude your right to a subsequent appeal. Your written request for reconsideration by the Assistant Secretary must be made within 30 days of the date of this letter, and must include a copy of this disallowance letter, and be sent to:</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
</w:rPr>
</w:pPr>
</w:p>
<w:p/>
<w:sectPr>
<w:pgSz w:w="12240" w:h="15840"/>
<w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
<w:cols w:space="720"/>
<w:docGrid w:linePitch="360"/>
</w:sectPr>
</w:body>
</w:document>