Jump to content

XmlTools: Difference between revisions

m
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 which is possible edit your code using XmlTools commands.
: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.
489

edits