There should be a way to get the raw data (from the Field) out of a
TIFFFieldNode in the way the IIOMetadataNode make it usual, ie : .getUserObject() !
At this time, .getUserObject() always return null on a TIFFFieldNode because
setUserObject() is never called at any point.
The constructor of TIFFFieldNode should add a line like :
Doing so, on any node you can get the real/raw data from it, and more
specifically on any unknown TIFF field you would still be able to get the raw
data in a straightforward way and use it !
There is a workaround to this, you have to get the string of the attribute value
out of the TIFFUndefined fake node and parse it back as decimal comma separated
list and reconstruct the byte array of the raw data.
But this required unnecessary extra processing and memory usage
In this contest, IMHO, there is no need to embed a TIFFUndefined node in a node
TIFFField with name='unknown'. Simply because it does not add any value !
Plus the DOM let us go wrong : there is no "embeded stuff" but an unknown field !
Removing the TIFFUndefined node creation from the code and let the TIFFField on
its own would be enough and fine in the context of a resolution of the part #1.