Package com.rometools.rome.io.impl

Examples of com.rometools.rome.io.impl.XmlFixerReader


        testInvalidTrim(" <!-- - -- --> x\n <!-- - -- --> ", XML_PROLOG + "<hello></hello>");
    }

    public void testAmpHandling() throws Exception {
        final String input = "&amp; &aa &";
        final BufferedReader reader = new BufferedReader(new XmlFixerReader(new StringReader(input)));
        final String output = reader.readLine();
        reader.close();
        assertEquals("&amp; &amp;aa &amp;", output);
    }
View Full Code Here


    }

    protected void testXmlParse(final String garbish, final String xmlDoc) throws Exception {
        final InputStream is = getStream(garbish, xmlDoc);
        Reader reader = new XmlReader(is);
        reader = new XmlFixerReader(reader);
        final SAXBuilder saxBuilder = new SAXBuilder();
        saxBuilder.build(reader);
    }
View Full Code Here

     */
    public WireFeed build(final File file) throws FileNotFoundException, IOException, IllegalArgumentException, FeedException {
        WireFeed feed;
        Reader reader = new FileReader(file);
        if (xmlHealerOn) {
            reader = new XmlFixerReader(reader);
        }
        feed = this.build(reader);
        reader.close();
        return feed;
    }
View Full Code Here

     */
    public WireFeed build(Reader reader) throws IllegalArgumentException, FeedException {
        final SAXBuilder saxBuilder = createSAXBuilder();
        try {
            if (xmlHealerOn) {
                reader = new XmlFixerReader(reader);
            }
            final Document document = saxBuilder.build(reader);
            return this.build(document);
        } catch (final JDOMParseException ex) {
            throw new ParsingFeedException("Invalid XML: " + ex.getMessage(), ex);
View Full Code Here

        super("rss_2.0", "jira_issue1.xml");
    }

    public void testAmpHandling() throws Exception {
        final String input = "&amp; &aa &";
        final BufferedReader reader = new BufferedReader(new XmlFixerReader(new StringReader(input)));
        final String output = reader.readLine();
        reader.close();
        assertEquals("&amp; &amp;aa &amp;", output);
    }
View Full Code Here

    }

    protected void testXmlParse(final String garbish, final String xmlDoc) throws Exception {
        final InputStream is = getStream(garbish, xmlDoc);
        Reader reader = new XmlReader(is);
        reader = new XmlFixerReader(reader);

        final SAXBuilder saxBuilder = new SAXBuilder();
        saxBuilder.build(reader);
    }
View Full Code Here

TOP

Related Classes of com.rometools.rome.io.impl.XmlFixerReader

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.