I am not quite sure what your scenario is, but when it comes to data binding, the example you saw is just a simple way of demonstrating the way DataProviders work. However, it is not necessary to use a DataProvider in order to open a file. This can easily be done as explained in this article
However, if your application logic requires visualizing the actual markup, you can check the demo I created and am attaching here.
I hope this helps.
All the best,