Package nokogiri

Examples of nokogiri.XmlNodeSet


    private IRubyObject fromObjectToRuby(Object o) {
        // argument object type is one of NodeList, String, Boolean, or Double.
        Ruby runtime = this.handler.getRuntime();
        if (o instanceof NodeList) {
            XmlNodeSet xmlNodeSet = (XmlNodeSet)NokogiriService.XML_NODESET_ALLOCATOR.allocate(runtime, getNokogiriClass(runtime, "Nokogiri::XML::NodeSet"));
            xmlNodeSet.setNodeList((NodeList) o);
            return xmlNodeSet;
        } else {
            return JavaUtil.convertJavaToUsableRubyObject(runtime, o);
        }
    }
View Full Code Here


        } else if (o instanceof RubyBoolean) {
            return o.toJava(Boolean.class);
        } else if (o instanceof XmlNodeSet) {
            return (NodeList)o;
        } else if (o instanceof RubyArray) {
            XmlNodeSet xmlNodeSet = XmlNodeSet.newXmlNodeSet(runtime.getCurrentContext(), (RubyArray)o);
            return (NodeList)xmlNodeSet;
        } else /*if (o instanceof XmlNode)*/ {
            return ((XmlNode) o).getNode();
        }
    }
View Full Code Here

TOP

Related Classes of nokogiri.XmlNodeSet

Copyright © 2018 www.massapicom. 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.