How to get field in xml?

Use an xml filter. There are many examples in this forum of how to configure it, such as this one.