I am building a Cordova app which goal is to manage some XML files.
Those XML files are converted into HTML pages using XSLT and the xml/xsl files are stored into device internal memory and not included into the app package.
To open a file (e.g. in Android), using the cordova-plugin-file
, I simply have a link in my index.html referring to cordova.file.externalDataDirectory+fileName.xml
and everything works fine.
But now, if I want to go back to the internal application folder, I cannot simply put a link in the XML file referring to
cordova.file.applicationStorageDirectory
because... it doesn't work.
The same if I try to use any plugin inside the XML files.
Eventually I would need to access Cordova plugins from the external files (e.g. cordova-plugin-qrscanner
inside a scan.xml personalized page).
I think this happens because I don't have access to cordova.js
after moving to the XML files, I've seen this and this but I was not able to adapt them to my situation.
I tried not to leave the index.html page and load the xml files in a <div>
as showed here, but still if some code coming from the XML tries to access a plugin, no result.
Is what I am trying to do possible? If not, is there a way to work around it? The XML files should stay outside the application folder and can be modified.
Thank you