org.eclipse.higgins.util.jscript
Class JScriptHelper

java.lang.Object
  extended byorg.eclipse.higgins.util.jscript.JScriptHelper

public class JScriptHelper
extends Object

Random helper functions for dealing with Java - JavaScript conversion and storage.

Author:
dbuss@novell.com

Constructor Summary
JScriptHelper()
           
 
Method Summary
static String convertNodeToScriptString(Node root)
          Convert a dom element to a string value, this routine knows about and handles when the root node a <SCRIPT> or the single child node is a <SCRIPT> element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JScriptHelper

public JScriptHelper()
Method Detail

convertNodeToScriptString

public static String convertNodeToScriptString(Node root)
Convert a dom element to a string value, this routine knows about and handles when the root node a <SCRIPT> or the single child node is a <SCRIPT> element.

Note that when JavaScript is stored in XML then the proper formating rules must be followed for example, " instead of a quote charachter. An alternative to mucking with indidual chars throughout the script is to enclose the entire script in <![CDATA[ ...script... ]]>

Parameters:
root - node containing javascript
Returns:
String or null if no valid data found