Package nokogiri.internals

Examples of nokogiri.internals.HtmlDomParserContext


            return runtime.getNil();
        }

        if (document instanceof HtmlDocument) {
            klass = getNokogiriClass(runtime, "Nokogiri::HTML::Document");
            ctx = new HtmlDomParserContext(runtime, options);
            ((HtmlDomParserContext)ctx).enableDocumentFragment();
            istream = new ByteArrayInputStream((rubyStringToString(str)).getBytes());
        } else if (document instanceof XmlDocument) {
            klass = getNokogiriClass(runtime, "Nokogiri::XML::Document");
            ctx = new XmlDomParserContext(runtime, options);
View Full Code Here


    public static IRubyObject do_parse(ThreadContext context,
                                       IRubyObject klass,
                                       IRubyObject[] args) {
        Ruby ruby = context.getRuntime();
        Arity.checkArgumentCount(ruby, args, 4, 4);
        HtmlDomParserContext ctx =
            new HtmlDomParserContext(ruby, args[2], args[3]);
        ctx.setInputSource(context, args[0], args[1]);
        return ctx.parse(context, klass, args[1]);
    }
View Full Code Here

TOP

Related Classes of nokogiri.internals.HtmlDomParserContext

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.