Recognise XML and RSS

Posted on 2006-05-18
Last Modified: 2013-11-23
Hi experts!

    From my understanding, if i pass an inputstream of an url to
javax.xml.DocumentBuilder's parse method, it will throw a "SAXException"
exception if that url does not point to a "valid" xml file, am i correct?

Let's say that url points to a valid xml file, how do i make sure if it is a "valid" RSS file?

Question by:fungi8210
    LVL 30

    Accepted Solution

    Yes, I guess that is correct. If its a SAXException, it means there is an error in parsing (so the file was probably incorrect in format). If its an IOException, there was an error in reading the file.
    LVL 30

    Expert Comment

    by:mayankeagle - check the documentation for the parse (InputStream is) method

    Author Comment

    Thanks, is there any method to validate "rss" file? since a valid xml file does not mean it is a valid rss file right?
    LVL 30

    Expert Comment

    Seems there is a toolkit for it:
    LVL 3

    Expert Comment


    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
    Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
    Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
    The viewer will learn how to implement Singleton Design Pattern in Java.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now