Package org.apache.bsf.xml

Examples of org.apache.bsf.xml.XMLHelper.toOMElement()


        // so use the unique name supported by the 1.6R7 version factory.
        ScriptEngine engine = new ScriptEngineManager().getEngineByName("rhino-nonjdk");
        assertNotNull("engine should not be null",engine);
        XMLHelper convertor = XMLHelper.getArgHelper(engine);
        Object o = convertor.toScriptXML(createOMElement("<a><b>petra</b></a>"));
        OMElement om = convertor.toOMElement(o);
        assertEquals("<a><b>petra</b></a>", om.toString());

        Bindings bindings = engine.createBindings();
        bindings.put("o", o);
        Object x = engine.eval("typeof o", bindings);
View Full Code Here


 
  public void testE4X() throws ScriptException, XMLStreamException, FactoryConfigurationError {
        ScriptEngine engine = new ScriptEngineManager().getEngineByExtension("js");
        XMLHelper convertor = XMLHelper.getArgHelper(engine);
        Object o = convertor.toScriptXML(createOMElement("<a><b>petra</b></a>"));
        OMElement om = convertor.toOMElement(o);
        assertEquals("<a><b>petra</b></a>", om.toString());
       
        Bindings bindings = engine.createBindings();
        bindings.put("o", o);
        Object x = engine.eval("typeof o", bindings);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.