I am not even a novice with XML, so please be gentle. If I have an XML string with undesirable attribute notes, how could I define and use an XSLT to purge those nodes from the string. Here is an example of the string and what I hope to achieve as a result. Thank you.
Sub PurgeUnwantedXMLAttributeNodes() Dim oXDoc As New MSXML2.DOMDocument Dim strXML As String oXDoc.LoadXML "<w:body xmlns:w='http://schemas.openxmlformats.org/wordprocessingml/2006/main'><w:p w:rsidR='00000000'" _& "w:rsidRDefault='00925327'><w:r><w:t>This cont</w:t></w:r><w:r w:rsidRPr='00586351'><w:t>ent</w:t></w:r>" _& "<w:r w:rsidRPr='009F3E4C'><w:t xml:space='preserve'> i</w:t></w:r><w:r><w:t xml:space='preserve'>s" _& "</w:t></w:r><w:r w:rsidRPr='00911A4E'><w:t>m</w:t></w:r><w:r w:rsidRPr='00661120'><w:t>onito</w:t>" _& "</w:r><w:r><w:t>red rich text.</w:t></w:r></w:p><w:sectPr w:rsidR='00000000'><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:sectPr></w:body>" strXML = oXDoc.XML 'How would I used XSLT to purge all of the attribute node containing "rsid" in the node basename? 'Desired result strXML = "<w:body xmlns:w='http://schemas.openxmlformats.org/wordprocessingml/2006/main'><w:p>" _& "<w:r><w:t>This cont</w:t></w:r><w:r><w:t>ent</w:t></w:r>" _& "<w:r ><w:t xml:space='preserve'> i</w:t></w:r><w:r><w:t xml:space='preserve'>s" _& "</w:t></w:r><w:r><w:t>m</w:t></w:r><w:r><w:t>onito</w:t>" _& "</w:r><w:r><w:t>red rich text.</w:t></w:r></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:sectPr></w:body>" End Sub
Greg Maxey Please visit my website at: http://gregmaxey.mvps.org/word_tips.htm