javascript - How can I easily edit code embedded in an xml element -
i have xml records javascript code embedded in element. like:
<?xml version="1.0" encoding="utf-8"?> <xml> <script> <sys_id>011fb5f68fb679a200b0af5a531815ae</sys_id> <sys_updated_on>2010-06-04 04:05:18</sys_updated_on> <js_script>function myjavascriptfunction(){ var count =0 ; alert('entering myjavascriptfunction'); } </js_script> <name>myjavascriptfunction</name> </script> </xml> this file saved .xml file (but happy change suffix if helped). purpose of command line utility roundtrips files database.
i edit script element using notepad++ - javascript language formatting help. i'd save script element contents file.
i have considered "inverting" file , saving javascript element contents directly .js file , put xml elements extended file properties. make easy edit language support, feels lot of work , files not transportable across os , source control systems.
am missing obvious? there clever approach this?
put script inside of cdata section
Comments
Post a Comment