com.isomorphic.xml
Class XML

java.lang.Object
  |
  +--com.isomorphic.base.Base
        |
        +--com.isomorphic.xml.XML

public class XML
extends com.isomorphic.base.Base

Provides programmatic access to the SmartClient XML processor.


Method Summary
static com.isomorphic.datasource.ValidationContext toJS(org.w3c.dom.Element element, java.io.Writer out)
          Converts XML from the passed Element object to JavaScript and writes it to the supplied Writer.
static com.isomorphic.datasource.ValidationContext toJS(java.io.Reader reader, java.io.Writer out)
          Converts XML read from the provided Reader to JavaScript and writes it to the supplied Writer.
static com.isomorphic.datasource.ValidationContext toJS(java.lang.String xml, java.io.Writer out)
          Converts an XML string to JavaScript and writes it to the supplied Writer.
 

Method Detail

toJS

public static com.isomorphic.datasource.ValidationContext toJS(java.lang.String xml,
                                                               java.io.Writer out)
                                                        throws java.lang.Exception
Converts an XML string to JavaScript and writes it to the supplied Writer.

XML.toJS(String) and XML.toJS(Reader) use the XML->JS translation supported by JSTranslater.toJS(), including translation of XML to live SmartClient components. These are convenience methods that assume the inbound String or Reader contains XML.

Parameters:
xml - xml string
out - writer where the generated JS output should be written
See Also:
JSTranslater.toJS(Object, Writer)

toJS

public static com.isomorphic.datasource.ValidationContext toJS(java.io.Reader reader,
                                                               java.io.Writer out)
                                                        throws java.lang.Exception
Converts XML read from the provided Reader to JavaScript and writes it to the supplied Writer.
Parameters:
reader - reader containing xml
out - writer where the generated JS output should be written

toJS

public static com.isomorphic.datasource.ValidationContext toJS(org.w3c.dom.Element element,
                                                               java.io.Writer out)
                                                        throws java.lang.Exception
Converts XML from the passed Element object to JavaScript and writes it to the supplied Writer.
Parameters:
element - xml element to be converted
out - writer where the generated JS output should be written