It seems to me that the problem is that the Folder object that contains this new xml field (where you insert your custom tag) is cached. So when you create a new article in the node where fetch is getting the data, the cache for that node is cleared but cache for the node containing this new xml field with custom tag related with your custom template is not cleared. The result is that yout custom template in which you fetch the data is not executed.
This could maybe be due to ViewCaching being enabled. Try one of this:
1. put {set-block scope=root variable=cache_ttl}0{/set-block} in the template used for view of the node containing this new xml field ...and clear the cache
2. disable ViewCaching ...and clear the cache
3. disable all the cache in the site ...and clear the cache
Try these suggestions one by one and see which one gives you the wanted result. So then maybe you'll be able to tell where exactly is the problem.
--
Nothing is impossible. Not if you can imagine it!
Marko, this is exactly the problem. When I add {set-block scope=root variable=cache_ttl}0{/set-block} to the main page which got this custom tag template included in its xmlfield, the fetch is ok, but this is a main page, and it needs to be cached..or else the whole system will crash due to overload with processing.
I then need to fix something so that only the custom tag template inside of this xmlfield is cleared(the cache) after a new object is published, so that not the cache for the whole node is cleared.