Set dynamic textfield length based on xml text?

Hello everyone,

On my project, I have a dynamic textfield inside a movieclip.
The textfield loads XML text.

How can I set the dynamic textfield length(width) based on how much text is typed on the xml file?

Thanks in advance!