Examples of XmlSyntaxError


Examples of nokogiri.XmlSyntaxError

    public XmlDocument getDocumentWithErrorsOrRaiseException(ThreadContext context, RubyClass klazz, Exception ex) {
        if (options.recover) {
            XmlDocument xmlDocument = getInterruptedOrNewXmlDocument(context, klazz);
            this.addErrorsIfNecessary(context, xmlDocument);
            XmlSyntaxError xmlSyntaxError = (XmlSyntaxError) NokogiriService.XML_SYNTAXERROR_ALLOCATOR.allocate(context.getRuntime(), getNokogiriClass(context.getRuntime(), "Nokogiri::XML::SyntaxError"));
            xmlSyntaxError.setException(ex);
            ((RubyArray) xmlDocument.getInstanceVariable("@errors")).append(xmlSyntaxError);
            return xmlDocument;
        } else {
            XmlSyntaxError xmlSyntaxError = (XmlSyntaxError) NokogiriService.XML_SYNTAXERROR_ALLOCATOR.allocate(context.getRuntime(), getNokogiriClass(context.getRuntime(), "Nokogiri::XML::SyntaxError"));
            xmlSyntaxError.setException(ex);
            throw new RaiseException(xmlSyntaxError);
        }
    }
View Full Code Here

Examples of nokogiri.XmlSyntaxError

    public List<IRubyObject> getErrorsReadyForRuby(ThreadContext context) {
        Ruby runtime = context.getRuntime();
        List<IRubyObject> res = new ArrayList<IRubyObject>();
        for (int i = 0; i < errors.size(); i++) {
            XmlSyntaxError xmlSyntaxError = (XmlSyntaxError) NokogiriService.XML_SYNTAXERROR_ALLOCATOR.allocate(runtime, getNokogiriClass(runtime, "Nokogiri::XML::SyntaxError"));
            xmlSyntaxError.setException(errors.get(i));
            res.add(xmlSyntaxError);
        }
        return res;
    }
View Full Code Here

Examples of nokogiri.XmlSyntaxError

        this.runtime = ruby;
        this.errors = array;
    }

    public void warning(SAXParseException ex) throws SAXException {
        XmlSyntaxError xmlSyntaxError = (XmlSyntaxError) NokogiriService.XML_SYNTAXERROR_ALLOCATOR.allocate(runtime, getNokogiriClass(runtime, "Nokogiri::XML::SyntaxError"));
        xmlSyntaxError.setException(ex);
        this.errors.append(xmlSyntaxError);
    }
View Full Code Here

Examples of nokogiri.XmlSyntaxError

        xmlSyntaxError.setException(ex);
        this.errors.append(xmlSyntaxError);
    }

    public void error(SAXParseException ex) throws SAXException {
        XmlSyntaxError xmlSyntaxError = (XmlSyntaxError) NokogiriService.XML_SYNTAXERROR_ALLOCATOR.allocate(runtime, getNokogiriClass(runtime, "Nokogiri::XML::SyntaxError"));
        xmlSyntaxError.setException(ex);
        this.errors.append(xmlSyntaxError);
    }
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.