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.


>> REGISTER NOW TO START POSTING


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

Results 1 to 2 of 2

Thread: End Element exception reading XML file

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    13
    My Mood
    Cool
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default End Element exception reading XML file

    Hi Guys,

    I have an issue with reading an XML file that contains several elements.
    The application will try to read the elements but on a certain point the application can't load the next start element. At least I think this is the issue.

    I get the following error:
    ------------------------------------------------------------------------------
    Start document
    Exception in thread "main" java.lang.NullPointerException
    at Test03.endElement(Test03.java:135)
    at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.endElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanEndElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl$FragmentContentDriver.next(Un known Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumen tScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocum entScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLPars er.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(Unknown Source)
    at Test03.main(Test03.java:46)
    ------------------------------------------------------------------------------

    Can anybody tell me what I'm doing wrong here?
    For the easy part of it I included the files as an attachment to the post.

    Test03.zip


  2. #2
    Junior Member
    Join Date
    Aug 2011
    Posts
    13
    My Mood
    Cool
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: End Element exception reading XML file

    Please can somebody help me I can't find why this error occurs.

Similar Threads

  1. Exception while reading xlsx file
    By tcstcs in forum Exceptions
    Replies: 1
    Last Post: May 5th, 2011, 05:06 AM
  2. Reading a file
    By Soccer13 in forum Java Theory & Questions
    Replies: 2
    Last Post: October 26th, 2010, 08:55 PM
  3. Help with reading from file
    By drazenmd in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: June 15th, 2010, 03:43 AM
  4. Extracting the BINDING element from WSDL file
    By Sai in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 26th, 2010, 02:56 AM
  5. [SOLVED] Problem in reading a file from java class
    By aznprdgy in forum File I/O & Other I/O Streams
    Replies: 11
    Last Post: March 23rd, 2009, 09:31 AM