Package com.sun.syndication.io

Examples of com.sun.syndication.io.FeedException


                try {
                    SAXBuilder saxBuilder = new SAXBuilder();
                    tmpDoc = saxBuilder.build(tmpDocReader);
                }
                catch (Exception ex) {
                    throw new FeedException("Invalid XML",ex);
                }

                List children = tmpDoc.getRootElement().removeContent();
                contentElement.addContent(children);
            }
View Full Code Here


       
        String baseURI = null;
        try {
            baseURI = findBaseURI(eFeed);
        } catch (Exception e) {
            throw new FeedException("ERROR while finding base URI of feed", e);
        }
       
        Feed feed = parseFeedMetadata(baseURI, eFeed);

        String xmlBase = eFeed.getAttributeValue("base", Namespace.XML_NAMESPACE);
View Full Code Here

                Element hour = (Element) hours.get(i);
                int value = Integer.parseInt(hour.getText().trim());

                if (isHourFormat24()) {
                    if ((value < 1) || (value > 24)) {
                        throw new FeedException("Invalid hour value " + value + ", it must be between 1 and 24");
                    }
                } else {
                    if ((value < 0) || (value > 23)) {
                        throw new FeedException("Invalid hour value " + value + ", it must be between 0 and 23");
                    }
                }
            }
        }
    }
View Full Code Here

                try {
                    SAXBuilder saxBuilder = new SAXBuilder();
                    tmpDoc = saxBuilder.build(tmpDocReader);
                }
                catch (Exception ex) {
                    throw new FeedException("Invalid XML",ex);
                }

                List children = tmpDoc.getRootElement().removeContent();
                contentElement.addContent(children);
            }
View Full Code Here

                try {
                    SAXBuilder saxBuilder = new SAXBuilder();
                    tmpDoc = saxBuilder.build(tmpDocReader);
                }
                catch (Exception ex) {
                    throw new FeedException("Invalid XML",ex);
                }

                List children = tmpDoc.getRootElement().removeContent();
                contentElement.addContent(children);
            }
View Full Code Here

       
        String baseURI = null;
        try {
            baseURI = findBaseURI(eFeed);
        } catch (Exception e) {
            throw new FeedException("ERROR while finding base URI of feed", e);
        }
       
        String xmlBase = eFeed.getAttributeValue("base", Namespace.XML_NAMESPACE);
        if (xmlBase != null) {
            feed.setXmlBase(xmlBase);
View Full Code Here

        Attribute version = new Attribute("version", VERSION);
        root.setAttribute(version);

        if (feed == null) {
            throw new FeedException("invalid Atom Feed - missing required feed element");
        }

        if (feed.getTitle() != null) {
            root.addContent(generateSimpleElement("title", feed.getTitle()));
        }
View Full Code Here

                try {
                    SAXBuilder saxBuilder = new SAXBuilder();
                    tmpDoc = saxBuilder.build(tmpDocReader);
                }
                catch (Exception ex) {
                    throw new FeedException("Invalid XML",ex);
                }
                List children = tmpDoc.getRootElement().removeContent();
                contentElement.addContent(children);
            } else {
                // must be type html, text or some other non-XML format
View Full Code Here

                try {
                    SAXBuilder saxBuilder = new SAXBuilder();
                    tmpDoc = saxBuilder.build(tmpDocReader);
                }
                catch (Exception ex) {
                    throw new FeedException("Invalid XML",ex);
                }

                List children = tmpDoc.getRootElement().removeContent();
                contentElement.addContent(children);
            }
View Full Code Here

        root.addNamespaceDeclaration(SY_NS);
        root.addNamespaceDeclaration(TAXO_NS);
        root.addNamespaceDeclaration(RSS_NS);

        if (channel == null) {
            throw new FeedException("invalid RSS Channel - missing required channel element");
        }
        root.addContent(generateChannelElement(channel));

        if (channel.getImage() != null) {
            root.addContent(generateImageElement(channel.getImage()));
View Full Code Here

TOP

Related Classes of com.sun.syndication.io.FeedException

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.