Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: XML using Sax simple examples

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Thanked 0 Times in 0 Posts

    Default XML using Sax simple examples

    I want the parse an XML file within my java application and put appropriate data into an array.

    I get the basic idea of the way this would work; I would create a reader, parse an input source and then use a ContentHandler.

    I'm finding all the different methods within the content handler a bit overwhelming, for what I need to do which ones do I need?

    If anyone has a really basic example, that would also be appreciated. It's a very small part of my program so I don't want to spend to long on it.

  2. #2
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    My Mood
    Thanked 82 Times in 78 Posts
    Blog Entries

    Default Re: XML using Sax simple examples

    You must look into XMLReaderAdapter class which implements ContentHandler....

Similar Threads

  1. Examples of Try Catch Exceptions
    By ch103 in forum Exceptions
    Replies: 11
    Last Post: February 8th, 2012, 09:22 PM
  2. Simple Shopping Cart..... not so simple
    By jpsider in forum What's Wrong With My Code?
    Replies: 5
    Last Post: January 20th, 2012, 02:18 PM
  3. Good examples for exam practice?
    By Twoacross in forum Java Theory & Questions
    Replies: 2
    Last Post: December 28th, 2011, 01:48 AM
  4. Program layout examples please
    By derekxec in forum Java Theory & Questions
    Replies: 1
    Last Post: July 2nd, 2011, 11:05 AM
  5. not so simple, simple swing question box
    By wolfgar in forum AWT / Java Swing
    Replies: 2
    Last Post: November 20th, 2009, 03:47 AM