Embedding XML as ByteArray with metadata

I am trying to embed an XML file, using the code

@:file("../preloader.xml") class Preloader_xml extends openfl.utils.ByteArray {}

as explained in documentation, but when I compile the project the compiler says

"characters 59-120 : Should extend by using a class"

What am I doing wrong?

According to the documentation, @:file only works in Flash.

Try this instead.

Maybe you can do it with project xml like this :

<assets path="../preloader.xml" type="binary" />

Well, I need it in the preloader, so I have to embed the resources, I can’t count on Assets.