489
edits
Script 10k (talk | contribs) |
Script 10k (talk | contribs) |
||
Line 113: | Line 113: | ||
<tt>@CUSTOMCODE [File<quoted file name>]</tt> | <tt>@CUSTOMCODE [File<quoted file name>]</tt> | ||
:Executes the [http://en.wikipedia.org/wiki/JavaScript javascript] code inside the code tag, useful for complex XML editing (using loops and conditions for example). <u>You should avoid this method</u> because it is much more slower than the native XmlTools commands, so always | :Executes the [http://en.wikipedia.org/wiki/JavaScript javascript] code inside the code tag, useful for complex XML editing (using loops and conditions for example). <u>You should avoid this method</u> because it is much more slower than the native XmlTools commands, so always when is possible edit your code using other XmlTools commands. | ||
:The XML library that you can use in javascript code is called ''W3C DOM Parser'' and its documentation is available [http://xmljs.sourceforge.net/website/documentation-w3cdom.html here]. | :The XML library that you can use in javascript code is called ''W3C DOM Parser'' and its documentation is available [http://xmljs.sourceforge.net/website/documentation-w3cdom.html here]. | ||
:The current file XML is saved at the global variable ''$xmlData''. So you will need to access it to edit the XML. Make sure that after the editing process you update ''$xmlData'' with the new XML so the file gets correctly edited. | :The current file XML is saved at the global variable ''$xmlData''. So you will need to access it to edit the XML. Make sure that after the editing process you update ''$xmlData'' with the new XML so the file gets correctly edited. |
edits