I am looking to dynamically add an external JavaScript or CSS file in my test.html file. Although I am aware of a trick that involves using jQuery like this:
$(”).appendTo(‘head’).attr({
rel: ‘stylesheet’,
type: ‘text/css’,
href: ‘**htttp://192.168.30.229:8080/**javascripts/jwysiwyg/jquery.wysiwyg.css’
});
My goal is to store the URL (http://192.168.30.229:8080/) of the CSS and JavaScript files in an XML file, such as web.xml. Then, I aim to retrieve the URL from the web.xml file and dynamically append it to the href attribute. This way, if the URL needs to be changed, for example, to **:http://192.168.100.229:7071/, the code in the HTML file does not need to be altered.
How can I properly write and read the URL from the XML file and utilize it in the test.html file?