Hello,
I am writing a word add-in in C#.
This add-in has to attach some metadata to bookmarks in the document. The metadata is stored in Word document variables.
Typical metadata can consist of a string identifier, three lists of [0 to 50] person-names each and about 5 Yes/No flags.
The problem is that I have to parse the metadata whenever the user moves the cursor onto bookmarked text so it has to be very fast, otherwise moving through the document will feel sluggish.
I was thinking of formatting the metadata using XmlTextWriter and parsing it using XmlTextReader.
However, I am not familiar with these classes and I am afraid that this approach may prove too slow on computers that are not state of the art.
The alternative is formatting and parsing the strings myself, perhaps using some combination of string.Split, string.Join, string.IndexOf and StringBuilder.
Since the metadata is only intended for the internal operation of the add-in, it can be as ugly as I want (in fact, I was thinking about obfuscating it do discourage users from messing with it but this may add another slowdown).
What would you suggest?
Thank you,
Alex.
--
Please replace myrealbox with alexoren to reply by email.