Subscribe to sdlxliff rebuild process

Hello,

I have a following functionality to develop - target XML files after preprocessing require the 'translationstatus' tag to contain the TM match score / status for each segment.

A fragment of target XML:

<Attribute identifier="XX_MATERIAL" name="XX_MATERIAL">
<Name translate="no" name="Name">XX_MATERIAL</Name>
<Value translate="yes" translationstatus="Language Manager" name="Value" identifier="XX_MATERIAL">Standard kullagersstål</Value>
</Attribute>
<Attribute identifier="XX_PERFORMANCE_CLASS" name="XX_PERFORMANCE_CLASS">
<Name translate="no" name="Name">XX_PERFORMANCE_CLASS</Name>
<Value translate="yes" translationstatus="Translation Memory" name="Value" identifier="XX_PERFORMANCE_CLASS">SSD Explorer</Value>
</Attribute>


The filter will only extract for translation the values of elements where attribute 'translate' is 'yes'.

So, I am looking for a way to correlate the segments of the bilingual file to proper parts of XML.
I want to avoid using XPATHs, or manually finding the elements based on some identifier attributes etc, as it seems a lot of non-reusable work.

The idea would be to:
1. take the bilingual file
2. trigger the rebuild
3. somehow attach to where it goes through each segments and replaces the source text with target text
4. and at this point for each segment, add/update the corresponding XML element

Is that possible, and is anybody able to point me to some code samples of how similar functionalities?
I gotta admit I am a bit lost in all the IFileExtractors, MultiFileConverters, BilingualParsers, XliffReaders etc:)