openxml - Custom Tag for a List in Word Doc -


i handcrafting document.xml generate word document. have requirement have add custom tag , custom tag attributes retained when word document saved.

below snippet document.xml

<w:p>                     <w:r>                         <w:rpr>                             <w:sz w:val="20"/>                             <w:szcs w:val="20"/>                             <w:rfonts w:ascii="times new roman" w:hansi="times new roman" w:cs="times new roman"/>                         </w:rpr>                         <w:t xml:space="preserve">default list</w:t>                     </w:r>                 </w:p>                 <w:p/>                 <w:p>                     <w:ppr>                         <w:numpr>                             <w:ilvl w:val="0"/>                             <w:numid w:val="1"/>                         </w:numpr>                         <w:numfmt w:val="defaultbullet"/>                         <w:ind w:left="720"/>                     </w:ppr>                     <w:r>                         <w:rpr>                             <w:sz w:val="20"/>                             <w:szcs w:val="20"/>                             <w:rfonts w:ascii="times new roman" w:hansi="times new roman" w:cs="times new roman"/>                         </w:rpr>                         <w:t xml:space="preserve">default 1</w:t>                     </w:r>                 </w:p>                 <w:p>                     <w:ppr>                         <w:numpr>                             <w:ilvl w:val="0"/>                             <w:numid w:val="1"/>                         </w:numpr>                         <w:numfmt w:val="defaultbullet"/>                         <w:ind w:left="720"/>                     </w:ppr>                     <w:r>                         <w:rpr>                             <w:sz w:val="20"/>                             <w:szcs w:val="20"/>                             <w:rfonts w:ascii="times new roman" w:hansi="times new roman" w:cs="times new roman"/>                         </w:rpr>                         <w:t xml:space="preserve">default 2</w:t>                     </w:r>                 </w:p> 

i have tried wrapping default 1 , default 2 paragraphs <w:customxml> , <w:customxmlpr> shown in example here: https://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.customxmlattribute(v=office.15).aspx

i have tried smarttag. tags, word document generated fine , contents correct. when make changes , save document , open contents of document.xml, tags gone. please me in identifying tags don't deleted when word document saved.

microsoft lost patent case drop using custom xml in word - check - https://redmondmag.com/articles/2009/08/12/court-tells-microsoft-to-stop-selling-word-in-us.aspx

so, not possible use custom xml way want use. best bet use content controls. check eric white's answer (archived link) available options.