I'm picking there's either a really easy or a really hard answer to this query.
I want to add custom XML or some kind of other metadata tag to parts of a document - ideally in Word but I'm open to other text editing programs if necessary. For example:
<topic1> text text text text </topic1>
<topic2> text text text text text </topic2>
text text text text
<topic1> text text text </topic1>
Ideally I'd like to be able to toggle viewing these tags off and on.
Ultimately I'm aiming to be able to pull the XML information into a consolidated database so you could see at a glance all the items tagged <topic1> across multiple documents.
I've considered using Word's References tools (especially the mark entry for indexing) and Styles but neither does do quite what I want it to. Styles are too easy to break between (cough, within) documents. Ideally, I'd also be able to apply formatting styles and my custom XML tags to the same pieces of text. The References tool seems to be intra-document only.
From the looks of things, older versions of word had the ability to markup custom XML but it was removed following a patent infringement claim.
Unzipping the .docx and manually adding XML tags might work, but is too cumbersome and I'll probably end up breaking something.