set theXmlFile to "file://localhost/Users/bernardo/Documents/Electronic%20Invoices/XML/000001-Eduardo%20Renam%20G.%20Polinati%20Com.%20ME.xml"
set theXmlFile to theXMLFile's |URL|()
There is no URL() method in class NSString. You have to create an NSURL object
set URLString to "file://localhost/Users/bernardo/Documents/Electronic%20Invoices/XML/000001-Eduardo%20Renam%20G.%20Polinati%20Com.%20ME.xml"
set theXmlFile to current application's class "NSURL"'s URLWithString_(URLString)